1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
class ReferenceController extends AbstractController
{
private RefHandler $refHandler;
public function __construct(RefHandler $refHandler)
{
$this->refHandler = $refHandler;
}
/**
* @Route(
* name="get_facture_with_ref",
* path="/api/facture/{reference}",
* methods={"GET"},
* defaults={
* "_controller"="\AppBundle\Controller\ReferenceController",
* "_api_resource_class"=Facture::class,
* "_api_item_operation_name"="special",
* "_api_property"="identifier=false"
* }
* )
*/
public function invoke(string $data): JsonResponse
{
$this->refHandler->handle($data);
}
} |
Partager