PHP code example of yceruto / decorator-bundle
1. Go to this page and download the library: Download yceruto/decorator-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/ */
yceruto / decorator-bundle example snippets
class MyController
{
#[Transactional(name: 'secondary')]
public function __invoke(Request $request): Response
{
// multiple persistence operations...
}
}
class MyController
{
#[Serialize]
public function __invoke(): array
{
return ['success' => true];
}
}