vendor/api-platform/core/src/Metadata/Post.php line 17

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the API Platform project.
  4.  *
  5.  * (c) Kévin Dunglas <dunglas@gmail.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace ApiPlatform\Metadata;
  12. #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
  13. final class Post extends HttpOperation
  14. {
  15.     private $itemUriTemplate;
  16.     /**
  17.      * {@inheritdoc}
  18.      */
  19.     public function __construct(
  20.         ?string $uriTemplate = null,
  21.         ?array $types = null,
  22.         $formats = null,
  23.         $inputFormats = null,
  24.         $outputFormats = null,
  25.         $uriVariables = null,
  26.         ?string $routePrefix = null,
  27.         ?string $routeName = null,
  28.         ?array $defaults = null,
  29.         ?array $requirements = null,
  30.         ?array $options = null,
  31.         ?bool $stateless = null,
  32.         ?string $sunset = null,
  33.         ?string $acceptPatch = null,
  34.         $status = null,
  35.         ?string $host = null,
  36.         ?array $schemes = null,
  37.         ?string $condition = null,
  38.         ?string $controller = null,
  39.         ?array $cacheHeaders = null,
  40.         ?array $hydraContext = null,
  41.         ?array $openapiContext = null,
  42.         ?bool $openapi = null,
  43.         ?array $exceptionToStatus = null,
  44.         ?bool $queryParameterValidationEnabled = null,
  45.         // abstract operation arguments
  46.         ?string $shortName = null,
  47.         ?string $class = null,
  48.         ?bool $paginationEnabled = null,
  49.         ?string $paginationType = null,
  50.         ?int $paginationItemsPerPage = null,
  51.         ?int $paginationMaximumItemsPerPage = null,
  52.         ?bool $paginationPartial = null,
  53.         ?bool $paginationClientEnabled = null,
  54.         ?bool $paginationClientItemsPerPage = null,
  55.         ?bool $paginationClientPartial = null,
  56.         ?bool $paginationFetchJoinCollection = null,
  57.         ?bool $paginationUseOutputWalkers = null,
  58.         ?array $paginationViaCursor = null,
  59.         ?array $order = null,
  60.         ?string $description = null,
  61.         ?array $normalizationContext = null,
  62.         ?array $denormalizationContext = null,
  63.         ?string $security = null,
  64.         ?string $securityMessage = null,
  65.         ?string $securityPostDenormalize = null,
  66.         ?string $securityPostDenormalizeMessage = null,
  67.         ?string $securityPostValidation = null,
  68.         ?string $securityPostValidationMessage = null,
  69.         ?string $deprecationReason = null,
  70.         ?array $filters = null,
  71.         ?array $validationContext = null,
  72.         $input = null,
  73.         $output = null,
  74.         $mercure = null,
  75.         $messenger = null,
  76.         ?bool $elasticsearch = null,
  77.         ?int $urlGenerationStrategy = null,
  78.         ?bool $read = null,
  79.         ?bool $deserialize = null,
  80.         ?bool $validate = null,
  81.         ?bool $write = null,
  82.         ?bool $serialize = null,
  83.         ?bool $fetchPartial = null,
  84.         ?bool $forceEager = null,
  85.         ?int $priority = null,
  86.         ?string $name = null,
  87.         $provider = null,
  88.         $processor = null,
  89.         array $extraProperties = [],
  90.         ?string $itemUriTemplate = null
  91.     ) {
  92.         parent::__construct(self::METHOD_POST, ...\func_get_args());
  93.         $this->itemUriTemplate = $itemUriTemplate;
  94.     }
  95.     public function getItemUriTemplate(): ?string
  96.     {
  97.         return $this->itemUriTemplate;
  98.     }
  99.     public function withItemUriTemplate(string $itemUriTemplate): self
  100.     {
  101.         $self = clone $this;
  102.         $self->itemUriTemplate = $itemUriTemplate;
  103.         return $self;
  104.     }
  105. }