• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

api-platform / core / 16531587208

25 Jul 2025 09:05PM UTC coverage: 0.0% (-22.1%) from 22.07%
16531587208

Pull #7225

github

web-flow
Merge 23f449a58 into 02a764950
Pull Request #7225: feat: json streamer

0 of 294 new or added lines in 31 files covered. (0.0%)

11514 existing lines in 375 files now uncovered.

0 of 51976 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Metadata/ApiResource.php
1
<?php
2

3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <dunglas@gmail.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
declare(strict_types=1);
13

14
namespace ApiPlatform\Metadata;
15

16
use ApiPlatform\Metadata\GraphQl\Operation as GraphQlOperation;
17
use ApiPlatform\OpenApi\Model\Operation as OpenApiOperation;
18
use ApiPlatform\State\OptionsInterface;
19

20
/**
21
 * Resource metadata attribute.
22
 *
23
 * The API Resource attribute declares the behaviors attached to a Resource inside API Platform.
24
 * This class is immutable, and if you set a value yourself, API Platform will not override the value.
25
 * The API Resource helps to share options with operations.
26
 *
27
 * Read more about how metadata works [here](/docs/in-depth/metadata).
28
 *
29
 * @author Antoine Bluchet <soyuka@gmail.com>
30
 */
31
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
32
class ApiResource extends Metadata
33
{
34
    use CascadeToOperationsTrait;
35
    use WithResourceTrait;
36

37
    /**
38
     * @var Operations<HttpOperation>
39
     */
40
    protected ?Operations $operations;
41

42
    /**
43
     * @param list<HttpOperation>|array<string, HttpOperation>|Operations<HttpOperation>|null $operations   Operations is a list of HttpOperation
44
     * @param array<string, Link>|array<string, mixed[]>|string[]|string|null                 $uriVariables
45
     * @param class-string                                                                    $class
46
     * @param array<string, string>                                                           $headers
47
     * @param string|callable|null                                                            $provider
48
     * @param string|callable|null                                                            $processor
49
     * @param mixed|null                                                                      $mercure
50
     * @param mixed|null                                                                      $messenger
51
     * @param mixed|null                                                                      $input
52
     * @param mixed|null                                                                      $output
53
     */
54
    public function __construct(
55
        /**
56
         * The URI template represents your resource IRI with optional variables. It follows [RFC 6570](https://www.rfc-editor.org/rfc/rfc6570.html).
57
         * API Platform generates this URL for you if you leave this empty.
58
         */
59
        protected ?string $uriTemplate = null,
60

61
        /**
62
         * The short name of your resource is a unique name that identifies your resource.
63
         * It is used within the documentation and for url generation if the `uriTemplate` is not filled. By default, this will be the name of your PHP class.
64
         */
65
        protected ?string $shortName = null,
66

67
        /**
68
         * A description for this resource that will show on documentations.
69
         */
70
        protected ?string $description = null,
71

72
        /**
73
         * The RDF types of this resource.
74
         * An RDF type is usually a URI referencing how your resource is structured for the outside world. Values can be a string `https://schema.org/Book`
75
         * or an array of string `['https://schema.org/Flight', 'https://schema.org/BusTrip']`.
76
         */
77
        protected string|array|null $types = null,
78

79
        /**
80
         * Operations is a list of [HttpOperation](./HttpOperation).
81
         *
82
         * By default API Platform declares operations representing CRUD routes if you don't specify this parameter:
83
         *
84
         * ```php
85
         * #[ApiResource(
86
         *     operations: [
87
         *         new Get(uriTemplate: '/books/{id}'),
88
         *         // The GetCollection operation returns a list of Books.
89
         *         new GetCollection(uriTemplate: '/books'),
90
         *         new Post(uriTemplate: '/books'),
91
         *         new Patch(uriTemplate: '/books/{id}'),
92
         *         new Delete(uriTemplate: '/books/{id}'),
93
         *     ]
94
         * )]
95
         *
96
         * ```
97
         *
98
         * Try this live at [play.api-platform.com/api-resource](play.api-platform.com).
99
         */
100
        $operations = null,
101

102
        /**
103
         * The `formats` option allows you to customize content negotiation. By default API Platform supports JsonLd, Hal, JsonAPI.
104
         * For other formats we use the Symfony Serializer.
105
         *
106
         * ```php
107
         * #[ApiResource(
108
         *   formats: [
109
         *       'jsonld' => ['application/ld+json'],
110
         *       'jsonhal' => ['application/hal+json'],
111
         *       'jsonapi' => ['application/vnd.api+json'],
112
         *       'json' =>    ['application/json'],
113
         *       'xml' =>     ['application/xml', 'text/xml'],
114
         *       'yaml' =>    ['application/yaml'],
115
         *       'csv' =>     ['text/csv'],
116
         *       'html' =>    ['text/html'],
117
         *       'myformat' =>['application/vnd.myformat'],
118
         *   ]
119
         * )]
120
         * ```
121
         *
122
         * Learn more about custom formats in the [dedicated guide](/guides/custom-formats).
123
         */
124
        protected array|string|null $formats = null,
125
        /**
126
         * The `inputFormats` option allows you to customize content negotiation for HTTP bodies:.
127
         *
128
         * ```php
129
         *  #[ApiResource(formats: ['jsonld', 'csv' => ['text/csv']], operations: [
130
         *      new Patch(inputFormats: ['json' => ['application/merge-patch+json']]),
131
         *      new GetCollection(),
132
         *      new Post(),
133
         *  ])]
134
         * ```
135
         */
136
        protected array|string|null $inputFormats = null,
137
        /**
138
         * The `outputFormats` option allows you to customize content negotiation for HTTP responses.
139
         */
140
        protected array|string|null $outputFormats = null,
141
        /**
142
         * The `uriVariables` configuration allows to configure to what each URI Variable.
143
         * With [simple string expansion](https://www.rfc-editor.org/rfc/rfc6570.html#section-3.2.2), we read the input
144
         * value and match this to the given `Link`. Note that this setting is usually used on an operation directly:.
145
         *
146
         * ```php
147
         *   #[ApiResource(
148
         *       uriTemplate: '/companies/{companyId}/employees/{id}',
149
         *       uriVariables: [
150
         *           'companyId' => new Link(fromClass: Company::class, toProperty: 'company'),
151
         *           'id' => new Link(fromClass: Employee::class)
152
         *       ],
153
         *       operations: [new Get()]
154
         *   )]
155
         * ```
156
         *
157
         * For more examples, read our guide on [subresources](/guides/subresources).
158
         */
159
        protected $uriVariables = null,
160
        /**
161
         * The `routePrefix` allows you to configure a prefix that will apply to this resource.
162
         *
163
         * ```php
164
         *   #[ApiResource(
165
         *       routePrefix: '/books',
166
         *       operations: [new Get(uriTemplate: '/{id}')]
167
         *   )]
168
         * ```
169
         *
170
         * This resource will be accessible through `/books/{id}`.
171
         */
172
        protected ?string $routePrefix = null,
173
        /**
174
         * The `defaults` option adds up to [Symfony's route defaults](https://github.com/symfony/routing/blob/8f068b792e515b25e26855ac8dc7fe800399f3e5/Route.php#L41). You can override [API Platform's defaults](https://github.com/api-platform/core/blob/6abd0fe0a69d4842eb6d5c31ef2bd6dce0e1d372/src/Symfony/Routing/ApiLoader.php#L87) if needed.
175
         */
176
        protected ?array $defaults = null,
177
        /**
178
         * The `requirements` option configures the Symfony's Route requirements.
179
         */
180
        protected ?array $requirements = null,
181
        /**
182
         * The `options` option configures the Symfony's Route options.
183
         */
184
        protected ?array $options = null,
185
        /**
186
         * The `stateless` option configures the Symfony's Route stateless option.
187
         */
188
        protected ?bool $stateless = null,
189
        /**
190
         * The `sunset` option indicates when a deprecated operation will be removed.
191
         *
192
         * <div data-code-selector>
193
         *
194
         * ```php
195
         * <?php
196
         * // api/src/Entity/Parchment.php
197
         * use ApiPlatform\Metadata\ApiResource;
198
         *
199
         * #[ApiResource(deprecationReason: 'Create a Book instead', sunset: '01/01/2020')]
200
         * class Parchment
201
         * {
202
         *     // ...
203
         * }
204
         * ```
205
         *
206
         * ```yaml
207
         * # api/config/api_platform/resources.yaml
208
         * resources:
209
         *     App\Entity\Parchment:
210
         *         - deprecationReason: 'Create a Book instead'
211
         *           sunset: '01/01/2020'
212
         * ```
213
         *
214
         * ```xml
215
         * <?xml version="1.0" encoding="UTF-8" ?>
216
         * <!-- api/config/api_platform/resources.xml -->
217
         *
218
         * <resources
219
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
220
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
221
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
222
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
223
         *     <resource class="App\Entity\Parchment" deprecationReason="Create a Book instead" sunset="01/01/2020" />
224
         * </resources>
225
         * ```
226
         *
227
         * </div>
228
         */
229
        protected ?string $sunset = null,
230
        protected ?string $acceptPatch = null,
231
        protected ?int $status = null,
232
        protected ?string $host = null,
233
        protected ?array $schemes = null,
234
        protected ?string $condition = null,
235
        protected ?string $controller = null,
236
        protected ?string $class = null,
237
        /**
238
         * The `urlGenerationStrategy` option configures the url generation strategy.
239
         *
240
         * See: [UrlGeneratorInterface::class](/reference/Api/UrlGeneratorInterface)
241
         *
242
         * <div data-code-selector>
243
         *
244
         * ```php
245
         * <?php
246
         * // api/src/Entity/Book.php
247
         * use ApiPlatform\Metadata\ApiResource;
248
         * use ApiPlatform\Api\UrlGeneratorInterface;
249
         *
250
         * #[ApiResource(urlGenerationStrategy: UrlGeneratorInterface::ABS_URL)]
251
         * class Book
252
         * {
253
         *     // ...
254
         * }
255
         * ```
256
         *
257
         * ```yaml
258
         * # api/config/api_platform/resources.yaml
259
         * App\Entity\Book:
260
         *     urlGenerationStrategy: !php/const ApiPlatform\Metadata\UrlGeneratorInterface::ABS_URL
261
         * ```
262
         *
263
         * ```xml
264
         * <?xml version="1.0" encoding="UTF-8" ?>
265
         * <!-- api/config/api_platform/resources.xml -->
266
         *
267
         * <resources
268
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
269
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
270
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
271
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
272
         *     <resource class="App\Entity\Book" urlGenerationStrategy="0" />
273
         * </resources>
274
         * ```
275
         *
276
         * </div>
277
         */
278
        protected ?int $urlGenerationStrategy = null,
279
        /**
280
         * The `deprecationReason` option deprecates the current resource with a deprecation message.
281
         *
282
         * <div data-code-selector>
283
         *
284
         * ```php
285
         * <?php
286
         * // api/src/Entity/Parchment.php
287
         * use ApiPlatform\Metadata\ApiResource;
288
         *
289
         * #[ApiResource(deprecationReason: 'Create a Book instead')]
290
         * class Parchment
291
         * {
292
         *     // ...
293
         * }
294
         * ```
295
         *
296
         * ```yaml
297
         * # api/config/api_platform/resources.yaml
298
         * resources:
299
         *     App\Entity\Parchment:
300
         *         - deprecationReason: 'Create a Book instead'
301
         * ```
302
         *
303
         * ```xml
304
         * <?xml version="1.0" encoding="UTF-8" ?>
305
         * <!-- api/config/api_platform/resources.xml -->
306
         *
307
         * <resources
308
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
309
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
310
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
311
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
312
         *     <resource class="App\Entity\Parchment" deprecationReason="Create a Book instead" />
313
         * </resources>
314
         * ```
315
         *
316
         * </div>
317
         *
318
         * - With JSON-lD / Hydra, [an `owl:deprecated` annotation property](https://www.w3.org/TR/owl2-syntax/#Annotation_Properties) will be added to the appropriate data structure
319
         * - With Swagger / OpenAPI, [a `deprecated` property](https://swagger.io/docs/specification/2-0/paths-and-operations/) will be added
320
         * - With GraphQL, the [`isDeprecated` and `deprecationReason` properties](https://facebook.github.io/graphql/June2018/#sec-Deprecation) will be added to the schema
321
         */
322
        protected ?string $deprecationReason = null,
323
        protected ?array $headers = null,
324
        protected ?array $cacheHeaders = null,
325
        protected ?array $normalizationContext = null,
326
        protected ?array $denormalizationContext = null,
327
        protected ?bool $collectDenormalizationErrors = null,
328
        protected ?array $hydraContext = null,
329
        protected bool|OpenApiOperation|null $openapi = null,
330
        /**
331
         * The `validationContext` option configures the context of validation for the current ApiResource.
332
         * You can, for instance, describe the validation groups that will be used:.
333
         *
334
         * ```php
335
         * #[ApiResource(validationContext: ['groups' => ['a', 'b']])]
336
         * ```
337
         *
338
         * For more examples, read our guide on [validation](/guides/validation).
339
         */
340
        protected ?array $validationContext = null,
341
        /**
342
         * The `filters` option configures the filters (declared as services) available on the collection routes for the current resource.
343
         *
344
         * <div data-code-selector>
345
         *
346
         * ```php
347
         * <?php
348
         * // api/src/Entity/Book.php
349
         * use ApiPlatform\Metadata\ApiResource;
350
         *
351
         * #[ApiResource(filters: ['app.filters.book.search'])]
352
         * class Book
353
         * {
354
         *     // ...
355
         * }
356
         * ```
357
         *
358
         * ```yaml
359
         * # api/config/api_platform/resources.yaml
360
         * resources:
361
         *     App\Entity\Book:
362
         *         - filters: ['app.filters.book.search']
363
         * ```
364
         *
365
         * ```xml
366
         * <?xml version="1.0" encoding="UTF-8" ?>
367
         * <!-- api/config/api_platform/resources.xml -->
368
         * <resources
369
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
370
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
371
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
372
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
373
         *     <resource class="App\Entity\Book">
374
         *         <filters>
375
         *             <filter>app.filters.book.search</filter>
376
         *         </filters>
377
         *     </resource>
378
         * </resources>
379
         * ```
380
         *
381
         * </div>
382
         */
383
        protected ?array $filters = null,
384
        protected $mercure = null,
385
        /**
386
         * The `messenger` option dispatches the current resource through the Message Bus.
387
         *
388
         * <div data-code-selector>
389
         *
390
         * ```php
391
         * <?php
392
         * // api/src/Entity/Book.php
393
         * use ApiPlatform\Metadata\ApiResource;
394
         *
395
         * #[ApiResource(messenger: true)]
396
         * class Book
397
         * {
398
         *     // ...
399
         * }
400
         * ```
401
         *
402
         * ```yaml
403
         * # api/config/api_platform/resources.yaml
404
         * resources:
405
         *     App\Entity\Book:
406
         *         - messenger: true
407
         * ```
408
         *
409
         * ```xml
410
         * <?xml version="1.0" encoding="UTF-8" ?>
411
         * <!-- api/config/api_platform/resources.xml -->
412
         *
413
         * <resources
414
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
415
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
416
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
417
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
418
         *     <resource class="App\Entity\Book" messenger=true />
419
         * </resources>
420
         * ```
421
         *
422
         * </div>
423
         *
424
         * Note: when using `messenger=true` on a Doctrine entity, the Doctrine Processor is not called. If you want it
425
         * to be called, you should [decorate a built-in state processor](/docs/guide/hook-a-persistence-layer-with-a-processor)
426
         * and implement your own logic.
427
         *
428
         * Read [how to use Messenger with an Input object](/docs/guide/using-messenger-with-an-input-object).
429
         *
430
         * @var string|bool|null
431
         */
432
        protected $messenger = null,
433
        protected $input = null,
434
        protected $output = null,
435
        /**
436
         * Override the default order of items in your collection. Note that this is handled by our doctrine filters such as
437
         * the [OrderFilter](/docs/reference/Doctrine/Orm/Filter/OrderFilter).
438
         *
439
         * By default, items in the collection are ordered in ascending (ASC) order by their resource identifier(s). If you want to
440
         * customize this order, you must add an `order` attribute on your ApiResource annotation:
441
         *
442
         * <div data-code-selector>
443
         *
444
         * ```php
445
         * <?php
446
         * // api/src/Entity/Book.php
447
         * namespace App\Entity;
448
         *
449
         * use ApiPlatform\Metadata\ApiResource;
450
         *
451
         * #[ApiResource(order: ['foo' => 'ASC'])]
452
         * class Book
453
         * {
454
         * }
455
         * ```
456
         *
457
         * ```yaml
458
         * # api/config/api_platform/resources/Book.yaml
459
         * App\Entity\Book:
460
         *     order:
461
         *         foo: ASC
462
         * ```
463
         *
464
         * </div>
465
         *
466
         * This `order` attribute is used as an array: the key defines the order field, the values defines the direction.
467
         * If you only specify the key, `ASC` direction will be used as default.
468
         */
469
        protected ?array $order = null,
470
        protected ?bool $fetchPartial = null,
471
        protected ?bool $forceEager = null,
472
        /**
473
         * The `paginationClientEnabled` option allows (or disallows) the client to enable (or disable) the pagination for the current resource.
474
         *
475
         * <div data-code-selector>
476
         *
477
         * ```php
478
         * <?php
479
         * // api/src/Entity/Book.php
480
         * use ApiPlatform\Metadata\ApiResource;
481
         *
482
         * #[ApiResource(paginationClientEnabled: true)]
483
         * class Book
484
         * {
485
         *     // ...
486
         * }
487
         * ```
488
         *
489
         * ```yaml
490
         * # api/config/api_platform/resources.yaml
491
         * resources:
492
         *     App\Entity\Book:
493
         *         - paginationClientEnabled: true
494
         * ```
495
         *
496
         * ```xml
497
         * <?xml version="1.0" encoding="UTF-8" ?>
498
         * <!-- api/config/api_platform/resources.xml -->
499
         *
500
         * <resources
501
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
502
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
503
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
504
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
505
         *     <resource class="App\Entity\Book" paginationClientEnabled=true />
506
         * </resources>
507
         * ```
508
         *
509
         * </div>
510
         *
511
         * The pagination can now be enabled (or disabled) by adding a query parameter named `pagination`:
512
         * - `GET /books?pagination=false`: disabled
513
         * - `GET /books?pagination=true`: enabled
514
         */
515
        protected ?bool $paginationClientEnabled = null,
516
        /**
517
         * The `paginationClientItemsPerPage` option allows (or disallows) the client to set the number of items per page for the current resource.
518
         *
519
         * <div data-code-selector>
520
         *
521
         * ```php
522
         * <?php
523
         * // api/src/Entity/Book.php
524
         * use ApiPlatform\Metadata\ApiResource;
525
         *
526
         * #[ApiResource(paginationClientItemsPerPage: true)]
527
         * class Book
528
         * {
529
         *     // ...
530
         * }
531
         * ```
532
         *
533
         * ```yaml
534
         * # api/config/api_platform/resources.yaml
535
         * resources:
536
         *     App\Entity\Book:
537
         *         - paginationClientItemsPerPage: true
538
         * ```
539
         *
540
         * ```xml
541
         * <?xml version="1.0" encoding="UTF-8" ?>
542
         * <!-- api/config/api_platform/resources.xml -->
543
         *
544
         * <resources
545
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
546
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
547
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
548
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
549
         *     <resource class="App\Entity\Book" paginationClientItemsPerPage=true />
550
         * </resources>
551
         * ```
552
         *
553
         * </div>
554
         *
555
         * The number of items can now be set by adding a query parameter named `itemsPerPage`:
556
         * - `GET /books?itemsPerPage=50`
557
         */
558
        protected ?bool $paginationClientItemsPerPage = null,
559
        /**
560
         * The `paginationClientPartial` option allows (or disallows) the client to enable (or disable) the partial pagination for the current resource.
561
         *
562
         * <div data-code-selector>
563
         *
564
         * ```php
565
         * <?php
566
         * // api/src/Entity/Book.php
567
         * use ApiPlatform\Metadata\ApiResource;
568
         *
569
         * #[ApiResource(paginationClientPartial: true)]
570
         * class Book
571
         * {
572
         *     // ...
573
         * }
574
         * ```
575
         *
576
         * ```yaml
577
         * # api/config/api_platform/resources.yaml
578
         * resources:
579
         *     App\Entity\Book:
580
         *         - paginationClientPartial: true
581
         * ```
582
         *
583
         * ```xml
584
         * <?xml version="1.0" encoding="UTF-8" ?>
585
         * <!-- api/config/api_platform/resources.xml -->
586
         *
587
         * <resources
588
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
589
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
590
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
591
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
592
         *     <resource class="App\Entity\Book" paginationClientPartial=true />
593
         * </resources>
594
         * ```
595
         *
596
         * </div>
597
         *
598
         * The partial pagination can now be enabled (or disabled) by adding a query parameter named `partial`:
599
         * - `GET /books?partial=false`: disabled
600
         * - `GET /books?partial=true`: enabled
601
         */
602
        protected ?bool $paginationClientPartial = null,
603
        /**
604
         * The `paginationViaCursor` option configures the cursor-based pagination for the current resource.
605
         * Select your unique sorted field as well as the direction you'll like the pagination to go via filters.
606
         * Note that for now you have to declare a `RangeFilter` and an `OrderFilter` on the property used for the cursor-based pagination:.
607
         *
608
         * <div data-code-selector>
609
         *
610
         * ```php
611
         * <?php
612
         * // api/src/Entity/Book.php
613
         * use ApiPlatform\Metadata\ApiFilter;
614
         * use ApiPlatform\Metadata\ApiResource;
615
         * use ApiPlatform\Doctrine\Odm\Filter\OrderFilter;
616
         * use ApiPlatform\Doctrine\Odm\Filter\RangeFilter;
617
         *
618
         * #[ApiResource(paginationPartial: true, paginationViaCursor: [['field' => 'id', 'direction' => 'DESC']])]
619
         * #[ApiFilter(RangeFilter::class, properties: ["id"])]
620
         * #[ApiFilter(OrderFilter::class, properties: ["id" => "DESC"])]
621
         * class Book
622
         * {
623
         *     // ...
624
         * }
625
         * ```
626
         *
627
         * ```yaml
628
         * # api/config/api_platform/resources.yaml
629
         * resources:
630
         *     App\Entity\Book:
631
         *         - paginationPartial: true
632
         *           paginationViaCursor:
633
         *               - { field: 'id', direction: 'DESC' }
634
         *           filters: [ 'app.filters.book.range', 'app.filters.book.order' ]
635
         * ```
636
         *
637
         * ```xml
638
         * <?xml version="1.0" encoding="UTF-8" ?>
639
         * <!-- api/config/api_platform/resources.xml -->
640
         *
641
         * <resources
642
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
643
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
644
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
645
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
646
         *     <resource class="App\Entity\Book" paginationPartial=true>
647
         *         <filters>
648
         *             <filter>app.filters.book.range</filter>
649
         *             <filter>app.filters.book.order</filter>
650
         *         </filters>
651
         *         <paginationViaCursor>
652
         *             <paginationField field="id" direction="DESC" />
653
         *         </paginationViaCursor>
654
         *     </resource>
655
         * </resources>
656
         * ```
657
         *
658
         * </div>
659
         *
660
         * To know more about cursor-based pagination take a look at [this blog post on medium (draft)](https://medium.com/@sroze/74fd1d324723).
661
         */
662
        protected ?array $paginationViaCursor = null,
663
        /**
664
         * The `paginationEnabled` option enables (or disables) the pagination for the current resource.
665
         *
666
         * <div data-code-selector>
667
         *
668
         * ```php
669
         * <?php
670
         * // api/src/Entity/Book.php
671
         * use ApiPlatform\Metadata\ApiResource;
672
         *
673
         * #[ApiResource(paginationEnabled: true)]
674
         * class Book
675
         * {
676
         *     // ...
677
         * }
678
         * ```
679
         *
680
         * ```yaml
681
         * # api/config/api_platform/resources.yaml
682
         * resources:
683
         *     App\Entity\Book:
684
         *         - paginationEnabled: true
685
         * ```
686
         *
687
         * ```xml
688
         * <?xml version="1.0" encoding="UTF-8" ?>
689
         * <!-- api/config/api_platform/resources.xml -->
690
         *
691
         * <resources
692
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
693
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
694
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
695
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
696
         *     <resource class="App\Entity\Book" paginationEnabled=true />
697
         * </resources>
698
         * ```
699
         *
700
         * </div>
701
         */
702
        protected ?bool $paginationEnabled = null,
703
        /**
704
         * The PaginationExtension of API Platform performs some checks on the `QueryBuilder` to guess, in most common
705
         * cases, the correct values to use when configuring the Doctrine ORM Paginator: `$fetchJoinCollection`
706
         * argument, whether there is a join to a collection-valued association.
707
         *
708
         * When set to `true`, the Doctrine ORM Paginator will perform an additional query, in order to get the
709
         * correct number of results. You can configure this using the `paginationFetchJoinCollection` option:
710
         *
711
         * <div data-code-selector>
712
         *
713
         * ```php
714
         * <?php
715
         * // api/src/Entity/Book.php
716
         * use ApiPlatform\Metadata\ApiResource;
717
         *
718
         * #[ApiResource(paginationFetchJoinCollection: false)]
719
         * class Book
720
         * {
721
         *     // ...
722
         * }
723
         * ```
724
         *
725
         * ```yaml
726
         * # api/config/api_platform/resources.yaml
727
         * resources:
728
         *     App\Entity\Book:
729
         *         - paginationFetchJoinCollection: false
730
         * ```
731
         *
732
         * ```xml
733
         * <?xml version="1.0" encoding="UTF-8" ?>
734
         * <!-- api/config/api_platform/resources.xml -->
735
         *
736
         * <resources
737
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
738
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
739
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
740
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
741
         *     <resource class="App\Entity\Book" paginationFetchJoinCollection=false />
742
         * </resources>
743
         * ```
744
         *
745
         * </div>
746
         *
747
         * For more information, please see the [Pagination](https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/pagination.html) entry in the Doctrine ORM documentation.
748
         */
749
        protected ?bool $paginationFetchJoinCollection = null,
750
        /**
751
         * The PaginationExtension of API Platform performs some checks on the `QueryBuilder` to guess, in most common
752
         * cases, the correct values to use when configuring the Doctrine ORM Paginator: `$setUseOutputWalkers` setter,
753
         * whether to use output walkers.
754
         *
755
         * When set to `true`, the Doctrine ORM Paginator will use output walkers, which are compulsory for some types
756
         * of queries. You can configure this using the `paginationUseOutputWalkers` option:
757
         *
758
         * <div data-code-selector>
759
         *
760
         * ```php
761
         * <?php
762
         * // api/src/Entity/Book.php
763
         * use ApiPlatform\Metadata\ApiResource;
764
         *
765
         * #[ApiResource(paginationUseOutputWalkers: false)]
766
         * class Book
767
         * {
768
         *     // ...
769
         * }
770
         * ```
771
         *
772
         * ```yaml
773
         * # api/config/api_platform/resources.yaml
774
         * resources:
775
         *     App\Entity\Book:
776
         *         - paginationUseOutputWalkers: false
777
         * ```
778
         *
779
         * ```xml
780
         * <?xml version="1.0" encoding="UTF-8" ?>
781
         * <!-- api/config/api_platform/resources.xml -->
782
         * <resources
783
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
784
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
785
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
786
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
787
         *     <resource class="App\Entity\Book" paginationUseOutputWalkers=false />
788
         * </resources>
789
         * ```
790
         *
791
         * </div>
792
         *
793
         * For more information, please see the [Pagination](https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/pagination.html) entry in the Doctrine ORM documentation.
794
         */
795
        protected ?bool $paginationUseOutputWalkers = null,
796
        /**
797
         * The `paginationItemsPerPage` option defines the number of items per page for the current resource.
798
         *
799
         * <div data-code-selector>
800
         *
801
         * ```php
802
         * <?php
803
         * // api/src/Entity/Book.php
804
         * use ApiPlatform\Metadata\ApiResource;
805
         *
806
         * #[ApiResource(paginationItemsPerPage: 30)]
807
         * class Book
808
         * {
809
         *     // ...
810
         * }
811
         * ```
812
         *
813
         * ```yaml
814
         * # api/config/api_platform/resources.yaml
815
         * resources:
816
         *     App\Entity\Book:
817
         *         - paginationItemsPerPage: 30
818
         * ```
819
         *
820
         * ```xml
821
         * <?xml version="1.0" encoding="UTF-8" ?>
822
         * <!-- api/config/api_platform/resources.xml -->
823
         * <resources
824
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
825
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
826
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
827
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
828
         *     <resource class="App\Entity\Book" paginationItemsPerPage=30 />
829
         * </resources>
830
         * ```
831
         *
832
         * </div>
833
         */
834
        protected ?int $paginationItemsPerPage = null,
835
        /**
836
         * The `paginationMaximumItemsPerPage` option defines the maximum number of items per page for the current resource.
837
         *
838
         * <div data-code-selector>
839
         *
840
         * ```php
841
         * <?php
842
         * // api/src/Entity/Book.php
843
         * use ApiPlatform\Metadata\ApiResource;
844
         *
845
         * #[ApiResource(paginationMaximumItemsPerPage: 50)]
846
         * class Book
847
         * {
848
         *     // ...
849
         * }
850
         * ```
851
         *
852
         * ```yaml
853
         * # api/config/api_platform/resources.yaml
854
         * resources:
855
         *     App\Entity\Book:
856
         *         - paginationMaximumItemsPerPage: 50
857
         * ```
858
         *
859
         * ```xml
860
         * <?xml version="1.0" encoding="UTF-8" ?>
861
         * <!-- api/config/api_platform/resources.xml -->
862
         * <resources
863
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
864
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
865
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
866
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
867
         *     <resource class="App\Entity\Book" paginationMaximumItemsPerPage=50 />
868
         * </resources>
869
         * ```
870
         *
871
         * </div>
872
         */
873
        protected ?int $paginationMaximumItemsPerPage = null,
874
        /**
875
         * The `paginationPartial` option enables (or disables) the partial pagination for the current resource.
876
         *
877
         * <div data-code-selector>
878
         *
879
         * ```php
880
         * <?php
881
         * // api/src/Entity/Book.php
882
         * use ApiPlatform\Metadata\ApiResource;
883
         *
884
         * #[ApiResource(paginationPartial: true)]
885
         * class Book
886
         * {
887
         *     // ...
888
         * }
889
         * ```
890
         *
891
         * ```yaml
892
         * # api/config/api_platform/resources.yaml
893
         * resources:
894
         *     App\Entity\Book:
895
         *         - paginationPartial: true
896
         * ```
897
         *
898
         * ```xml
899
         * <?xml version="1.0" encoding="UTF-8" ?>
900
         * <!-- api/config/api_platform/resources.xml -->
901
         * <resources
902
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
903
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
904
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
905
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
906
         *     <resource class="App\Entity\Book" paginationPartial=true />
907
         * </resources>
908
         * ```
909
         *
910
         * </div>
911
         */
912
        protected ?bool $paginationPartial = null,
913
        /**
914
         * The `paginationType` option defines the type of pagination (`page` or `cursor`) to use for the current resource.
915
         *
916
         * <div data-code-selector>
917
         *
918
         * ```php
919
         * <?php
920
         * // api/src/Entity/Book.php
921
         * use ApiPlatform\Metadata\ApiResource;
922
         *
923
         * #[ApiResource(paginationType: 'page')]
924
         * class Book
925
         * {
926
         *     // ...
927
         * }
928
         * ```
929
         *
930
         * ```yaml
931
         * # api/config/api_platform/resources.yaml
932
         * resources:
933
         *     App\Entity\Book:
934
         *         - paginationType: page
935
         * ```
936
         *
937
         * ```xml
938
         * <?xml version="1.0" encoding="UTF-8" ?>
939
         * <!-- api/config/api_platform/resources.xml -->
940
         * <resources
941
         *         xmlns="https://api-platform.com/schema/metadata/resources-3.0"
942
         *         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
943
         *         xsi:schemaLocation="https://api-platform.com/schema/metadata/resources-3.0
944
         *         https://api-platform.com/schema/metadata/resources-3.0.xsd">
945
         *     <resource class="App\Entity\Book" paginationType="page" />
946
         * </resources>
947
         * ```
948
         *
949
         * </div>
950
         */
951
        protected ?string $paginationType = null,
952
        protected string|\Stringable|null $security = null,
953
        protected ?string $securityMessage = null,
954
        protected string|\Stringable|null $securityPostDenormalize = null,
955
        protected ?string $securityPostDenormalizeMessage = null,
956
        protected string|\Stringable|null $securityPostValidation = null,
957
        protected ?string $securityPostValidationMessage = null,
958
        protected ?bool $compositeIdentifier = null,
959
        protected ?array $exceptionToStatus = null,
960
        protected ?bool $queryParameterValidationEnabled = null,
961
        protected ?array $links = null,
962
        protected ?array $graphQlOperations = null,
963
        $provider = null,
964
        $processor = null,
965
        protected ?OptionsInterface $stateOptions = null,
966
        protected mixed $rules = null,
967
        ?string $policy = null,
968
        array|string|null $middleware = null,
969
        array|Parameters|null $parameters = null,
970
        protected ?bool $strictQueryParameterValidation = null,
971
        protected ?bool $hideHydraOperation = null,
972
        ?bool $jsonStream = null,
973
        protected array $extraProperties = [],
974
    ) {
UNCOV
975
        parent::__construct(
×
UNCOV
976
            shortName: $shortName,
×
UNCOV
977
            class: $class,
×
UNCOV
978
            description: $description,
×
UNCOV
979
            urlGenerationStrategy: $urlGenerationStrategy,
×
UNCOV
980
            deprecationReason: $deprecationReason,
×
UNCOV
981
            normalizationContext: $normalizationContext,
×
UNCOV
982
            denormalizationContext: $denormalizationContext,
×
UNCOV
983
            collectDenormalizationErrors: $collectDenormalizationErrors,
×
UNCOV
984
            validationContext: $validationContext,
×
UNCOV
985
            filters: $filters,
×
UNCOV
986
            mercure: $mercure,
×
UNCOV
987
            messenger: $messenger,
×
UNCOV
988
            input: $input,
×
UNCOV
989
            output: $output,
×
UNCOV
990
            order: $order,
×
UNCOV
991
            fetchPartial: $fetchPartial,
×
UNCOV
992
            forceEager: $forceEager,
×
UNCOV
993
            paginationEnabled: $paginationEnabled,
×
UNCOV
994
            paginationType: $paginationType,
×
UNCOV
995
            paginationItemsPerPage: $paginationItemsPerPage,
×
UNCOV
996
            paginationMaximumItemsPerPage: $paginationMaximumItemsPerPage,
×
UNCOV
997
            paginationPartial: $paginationPartial,
×
UNCOV
998
            paginationClientEnabled: $paginationClientEnabled,
×
UNCOV
999
            paginationClientItemsPerPage: $paginationClientItemsPerPage,
×
UNCOV
1000
            paginationClientPartial: $paginationClientPartial,
×
UNCOV
1001
            paginationFetchJoinCollection: $paginationFetchJoinCollection,
×
UNCOV
1002
            paginationUseOutputWalkers: $paginationUseOutputWalkers,
×
UNCOV
1003
            security: $security,
×
UNCOV
1004
            securityMessage: $securityMessage,
×
UNCOV
1005
            securityPostDenormalize: $securityPostDenormalize,
×
UNCOV
1006
            securityPostDenormalizeMessage: $securityPostDenormalizeMessage,
×
UNCOV
1007
            securityPostValidation: $securityPostValidation,
×
UNCOV
1008
            securityPostValidationMessage: $securityPostValidationMessage,
×
UNCOV
1009
            provider: $provider,
×
UNCOV
1010
            processor: $processor,
×
UNCOV
1011
            stateOptions: $stateOptions,
×
UNCOV
1012
            parameters: $parameters,
×
UNCOV
1013
            rules: $rules,
×
UNCOV
1014
            policy: $policy,
×
UNCOV
1015
            middleware: $middleware,
×
UNCOV
1016
            strictQueryParameterValidation: $strictQueryParameterValidation,
×
UNCOV
1017
            hideHydraOperation: $hideHydraOperation,
×
NEW
1018
            jsonStream: $jsonStream,
×
UNCOV
1019
            extraProperties: $extraProperties
×
UNCOV
1020
        );
×
1021

1022
        /* @var Operations<HttpOperation> $operations> */
UNCOV
1023
        $this->operations = null === $operations ? null : new Operations($operations);
×
UNCOV
1024
        $this->provider = $provider;
×
UNCOV
1025
        $this->processor = $processor;
×
UNCOV
1026
        if (\is_string($types)) {
×
1027
            $this->types = (array) $types;
×
1028
        }
1029
    }
1030

1031
    /**
1032
     * @return Operations<HttpOperation>|null
1033
     */
1034
    public function getOperations(): ?Operations
1035
    {
UNCOV
1036
        return $this->operations;
×
1037
    }
1038

1039
    /**
1040
     * @param Operations<HttpOperation> $operations
1041
     */
1042
    public function withOperations(Operations $operations): static
1043
    {
UNCOV
1044
        $self = clone $this;
×
UNCOV
1045
        $self->operations = $operations;
×
UNCOV
1046
        $self->operations->sort();
×
1047

UNCOV
1048
        return $self;
×
1049
    }
1050

1051
    public function getUriTemplate(): ?string
1052
    {
UNCOV
1053
        return $this->uriTemplate;
×
1054
    }
1055

1056
    public function withUriTemplate(string $uriTemplate): static
1057
    {
1058
        $self = clone $this;
×
1059
        $self->uriTemplate = $uriTemplate;
×
1060

1061
        return $self;
×
1062
    }
1063

1064
    public function getTypes(): ?array
1065
    {
UNCOV
1066
        return $this->types;
×
1067
    }
1068

1069
    /**
1070
     * @param string[]|string $types
1071
     */
1072
    public function withTypes(array|string $types): static
1073
    {
UNCOV
1074
        $self = clone $this;
×
UNCOV
1075
        $self->types = (array) $types;
×
1076

UNCOV
1077
        return $self;
×
1078
    }
1079

1080
    /**
1081
     * @return array|mixed|string|null
1082
     */
1083
    public function getFormats()
1084
    {
UNCOV
1085
        return $this->formats;
×
1086
    }
1087

1088
    public function withFormats(mixed $formats): static
1089
    {
1090
        $self = clone $this;
×
1091
        $self->formats = $formats;
×
1092

1093
        return $self;
×
1094
    }
1095

1096
    /**
1097
     * @return array|mixed|string|null
1098
     */
1099
    public function getInputFormats()
1100
    {
UNCOV
1101
        return $this->inputFormats;
×
1102
    }
1103

1104
    /**
1105
     * @param mixed|null $inputFormats
1106
     */
1107
    public function withInputFormats($inputFormats): static
1108
    {
1109
        $self = clone $this;
×
1110
        $self->inputFormats = $inputFormats;
×
1111

1112
        return $self;
×
1113
    }
1114

1115
    /**
1116
     * @return array|mixed|string|null
1117
     */
1118
    public function getOutputFormats()
1119
    {
UNCOV
1120
        return $this->outputFormats;
×
1121
    }
1122

1123
    /**
1124
     * @param mixed|null $outputFormats
1125
     */
1126
    public function withOutputFormats($outputFormats): static
1127
    {
1128
        $self = clone $this;
×
1129
        $self->outputFormats = $outputFormats;
×
1130

1131
        return $self;
×
1132
    }
1133

1134
    /**
1135
     * @return array<string, Link>|array<string, array>|string[]|string|null
1136
     */
1137
    public function getUriVariables()
1138
    {
UNCOV
1139
        return $this->uriVariables;
×
1140
    }
1141

1142
    /**
1143
     * @param array<string, Link>|array<string, array>|string[]|string|null $uriVariables
1144
     */
1145
    public function withUriVariables($uriVariables): static
1146
    {
UNCOV
1147
        $self = clone $this;
×
UNCOV
1148
        $self->uriVariables = $uriVariables;
×
1149

UNCOV
1150
        return $self;
×
1151
    }
1152

1153
    public function getRoutePrefix(): ?string
1154
    {
UNCOV
1155
        return $this->routePrefix;
×
1156
    }
1157

1158
    public function withRoutePrefix(string $routePrefix): static
1159
    {
1160
        $self = clone $this;
×
1161
        $self->routePrefix = $routePrefix;
×
1162

1163
        return $self;
×
1164
    }
1165

1166
    public function getDefaults(): ?array
1167
    {
UNCOV
1168
        return $this->defaults;
×
1169
    }
1170

1171
    public function withDefaults(array $defaults): static
1172
    {
1173
        $self = clone $this;
×
1174
        $self->defaults = $defaults;
×
1175

1176
        return $self;
×
1177
    }
1178

1179
    public function getRequirements(): ?array
1180
    {
UNCOV
1181
        return $this->requirements;
×
1182
    }
1183

1184
    public function withRequirements(array $requirements): static
1185
    {
1186
        $self = clone $this;
×
1187
        $self->requirements = $requirements;
×
1188

1189
        return $self;
×
1190
    }
1191

1192
    public function getOptions(): ?array
1193
    {
UNCOV
1194
        return $this->options;
×
1195
    }
1196

1197
    public function withOptions(array $options): static
1198
    {
1199
        $self = clone $this;
×
1200
        $self->options = $options;
×
1201

1202
        return $self;
×
1203
    }
1204

1205
    public function getStateless(): ?bool
1206
    {
UNCOV
1207
        return $this->stateless;
×
1208
    }
1209

1210
    public function withStateless(bool $stateless): static
1211
    {
1212
        $self = clone $this;
×
1213
        $self->stateless = $stateless;
×
1214

1215
        return $self;
×
1216
    }
1217

1218
    public function getSunset(): ?string
1219
    {
UNCOV
1220
        return $this->sunset;
×
1221
    }
1222

1223
    public function withSunset(string $sunset): static
1224
    {
1225
        $self = clone $this;
×
1226
        $self->sunset = $sunset;
×
1227

1228
        return $self;
×
1229
    }
1230

1231
    public function getAcceptPatch(): ?string
1232
    {
UNCOV
1233
        return $this->acceptPatch;
×
1234
    }
1235

1236
    public function withAcceptPatch(string $acceptPatch): static
1237
    {
1238
        $self = clone $this;
×
1239
        $self->acceptPatch = $acceptPatch;
×
1240

1241
        return $self;
×
1242
    }
1243

1244
    public function getStatus(): ?int
1245
    {
UNCOV
1246
        return $this->status;
×
1247
    }
1248

1249
    /**
1250
     * @param int $status
1251
     */
1252
    public function withStatus($status): static
1253
    {
UNCOV
1254
        $self = clone $this;
×
UNCOV
1255
        $self->status = $status;
×
1256

UNCOV
1257
        return $self;
×
1258
    }
1259

1260
    public function getHost(): ?string
1261
    {
UNCOV
1262
        return $this->host;
×
1263
    }
1264

1265
    public function withHost(string $host): static
1266
    {
1267
        $self = clone $this;
×
1268
        $self->host = $host;
×
1269

1270
        return $self;
×
1271
    }
1272

1273
    public function getSchemes(): ?array
1274
    {
UNCOV
1275
        return $this->schemes;
×
1276
    }
1277

1278
    public function withSchemes(array $schemes): static
1279
    {
1280
        $self = clone $this;
×
1281
        $self->schemes = $schemes;
×
1282

1283
        return $self;
×
1284
    }
1285

1286
    public function getCondition(): ?string
1287
    {
UNCOV
1288
        return $this->condition;
×
1289
    }
1290

1291
    public function withCondition(string $condition): static
1292
    {
1293
        $self = clone $this;
×
1294
        $self->condition = $condition;
×
1295

1296
        return $self;
×
1297
    }
1298

1299
    public function getController(): ?string
1300
    {
UNCOV
1301
        return $this->controller;
×
1302
    }
1303

1304
    public function withController(string $controller): static
1305
    {
1306
        $self = clone $this;
×
1307
        $self->controller = $controller;
×
1308

1309
        return $self;
×
1310
    }
1311

1312
    public function getHeaders(): ?array
1313
    {
UNCOV
1314
        return $this->headers;
×
1315
    }
1316

1317
    public function withHeaders(array $headers): static
1318
    {
1319
        $self = clone $this;
×
1320
        $self->headers = $headers;
×
1321

1322
        return $self;
×
1323
    }
1324

1325
    public function getCacheHeaders(): ?array
1326
    {
UNCOV
1327
        return $this->cacheHeaders;
×
1328
    }
1329

1330
    public function withCacheHeaders(array $cacheHeaders): static
1331
    {
UNCOV
1332
        $self = clone $this;
×
UNCOV
1333
        $self->cacheHeaders = $cacheHeaders;
×
1334

UNCOV
1335
        return $self;
×
1336
    }
1337

1338
    /**
1339
     * @return string[]|null
1340
     */
1341
    public function getHydraContext(): ?array
1342
    {
UNCOV
1343
        return $this->hydraContext;
×
1344
    }
1345

1346
    public function withHydraContext(array $hydraContext): static
1347
    {
1348
        $self = clone $this;
×
1349
        $self->hydraContext = $hydraContext;
×
1350

1351
        return $self;
×
1352
    }
1353

1354
    public function getOpenapi(): bool|OpenApiOperation|null
1355
    {
UNCOV
1356
        return $this->openapi;
×
1357
    }
1358

1359
    public function withOpenapi(bool|OpenApiOperation $openapi): static
1360
    {
1361
        $self = clone $this;
×
1362
        $self->openapi = $openapi;
×
1363

1364
        return $self;
×
1365
    }
1366

1367
    public function getPaginationViaCursor(): ?array
1368
    {
UNCOV
1369
        return $this->paginationViaCursor;
×
1370
    }
1371

1372
    public function withPaginationViaCursor(array $paginationViaCursor): static
1373
    {
1374
        $self = clone $this;
×
1375
        $self->paginationViaCursor = $paginationViaCursor;
×
1376

1377
        return $self;
×
1378
    }
1379

1380
    public function getExceptionToStatus(): ?array
1381
    {
UNCOV
1382
        return $this->exceptionToStatus;
×
1383
    }
1384

1385
    public function withExceptionToStatus(array $exceptionToStatus): static
1386
    {
1387
        $self = clone $this;
×
1388
        $self->exceptionToStatus = $exceptionToStatus;
×
1389

1390
        return $self;
×
1391
    }
1392

1393
    /**
1394
     * @return GraphQlOperation[]
1395
     */
1396
    public function getGraphQlOperations(): ?array
1397
    {
UNCOV
1398
        return $this->graphQlOperations;
×
1399
    }
1400

1401
    public function withGraphQlOperations(array $graphQlOperations): static
1402
    {
UNCOV
1403
        $self = clone $this;
×
UNCOV
1404
        $self->graphQlOperations = $graphQlOperations;
×
1405

UNCOV
1406
        return $self;
×
1407
    }
1408

1409
    public function getLinks(): ?array
1410
    {
UNCOV
1411
        return $this->links;
×
1412
    }
1413

1414
    /**
1415
     * @param Link[] $links
1416
     */
1417
    public function withLinks(array $links): static
1418
    {
1419
        $self = clone $this;
×
1420
        $self->links = $links;
×
1421

1422
        return $self;
×
1423
    }
1424
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc