PHP code example of jeremka / write-async-bundle

1. Go to this page and download the library: Download jeremka/write-async-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jeremka / write-async-bundle example snippets


#[Patch(
uriTemplate: '/posts/{id}',
extraProperties: [
'write_async' => true,
'transport'   => 'low_priority' // optionnel
],
status: 202,
output: false
)]
class Post {}

use Jeremka\WriteAsyncBundle\Attribute\WriteAsyncPatch;

#[WriteAsyncPatch('/posts/{id}', transport: 'low_priority')]
class Post {}