20 lines
447 B
PHP
20 lines
447 B
PHP
<?php
|
|
|
|
namespace App\State;
|
|
|
|
use ApiPlatform\Metadata\Operation;
|
|
use ApiPlatform\State\ProcessorInterface;
|
|
use App\Entity\Book;
|
|
|
|
/**
|
|
* @implements ProcessorInterface<Book>
|
|
*/
|
|
final class BookArchiver implements ProcessorInterface
|
|
{
|
|
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): mixed
|
|
{
|
|
// Handle the state: save it, send it, queue it...
|
|
|
|
return $data;
|
|
}
|
|
}
|