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

api-platform / core / 7142557150

08 Dec 2023 02:28PM UTC coverage: 36.003% (-1.4%) from 37.36%
7142557150

push

github

web-flow
fix(jsonld): remove link to ApiDocumentation when doc is disabled (#6029)

0 of 1 new or added line in 1 file covered. (0.0%)

2297 existing lines in 182 files now uncovered.

9992 of 27753 relevant lines covered (36.0%)

147.09 hits per line

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

57.32
/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 sharing 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 WithResourceTrait;
35

36
    protected ?Operations $operations;
37

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

55
        /**
56
         * The short name of your resource is a unique name that identifies your resource.
57
         * 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.
58
         */
59
        protected ?string $shortName = null,
60

61
        /**
62
         * A description for this resource that will show on documentations.
63
         */
64
        protected ?string $description = null,
65

66
        /**
67
         * The RDF types of this resource.
68
         * 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`
69
         * or an array of string `['https://schema.org/Flight', 'https://schema.org/BusTrip']`.
70
         */
71
        protected string|array|null $types = null,
72

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

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

1004
        $this->operations = null === $operations ? null : new Operations($operations);
78✔
1005
        $this->provider = $provider;
78✔
1006
        $this->processor = $processor;
78✔
1007
        if (\is_string($types)) {
78✔
1008
            $this->types = (array) $types;
×
1009
        }
1010
    }
1011

1012
    public function getOperations(): ?Operations
1013
    {
1014
        return $this->operations;
2,475✔
1015
    }
1016

1017
    public function withOperations(Operations $operations): self
1018
    {
1019
        $self = clone $this;
78✔
1020
        $self->operations = $operations;
78✔
1021

1022
        return $self;
78✔
1023
    }
1024

1025
    public function getUriTemplate(): ?string
1026
    {
1027
        return $this->uriTemplate;
78✔
1028
    }
1029

1030
    public function withUriTemplate(string $uriTemplate): self
1031
    {
1032
        $self = clone $this;
6✔
1033
        $self->uriTemplate = $uriTemplate;
6✔
1034

1035
        return $self;
6✔
1036
    }
1037

1038
    public function getTypes(): ?array
1039
    {
1040
        return $this->types;
90✔
1041
    }
1042

1043
    /**
1044
     * @param string[]|string $types
1045
     */
1046
    public function withTypes(array|string $types): self
1047
    {
1048
        $self = clone $this;
3✔
1049
        $self->types = (array) $types;
3✔
1050

1051
        return $self;
3✔
1052
    }
1053

1054
    /**
1055
     * @return array|mixed|string|null
1056
     */
1057
    public function getFormats()
1058
    {
1059
        return $this->formats;
78✔
1060
    }
1061

1062
    public function withFormats(mixed $formats): self
1063
    {
1064
        $self = clone $this;
×
1065
        $self->formats = $formats;
×
1066

1067
        return $self;
×
1068
    }
1069

1070
    /**
1071
     * @return array|mixed|string|null
1072
     */
1073
    public function getInputFormats()
1074
    {
1075
        return $this->inputFormats;
78✔
1076
    }
1077

1078
    /**
1079
     * @param mixed|null $inputFormats
1080
     */
1081
    public function withInputFormats($inputFormats): self
1082
    {
1083
        $self = clone $this;
×
1084
        $self->inputFormats = $inputFormats;
×
1085

1086
        return $self;
×
1087
    }
1088

1089
    /**
1090
     * @return array|mixed|string|null
1091
     */
1092
    public function getOutputFormats()
1093
    {
1094
        return $this->outputFormats;
78✔
1095
    }
1096

1097
    /**
1098
     * @param mixed|null $outputFormats
1099
     */
1100
    public function withOutputFormats($outputFormats): self
1101
    {
1102
        $self = clone $this;
×
1103
        $self->outputFormats = $outputFormats;
×
1104

1105
        return $self;
×
1106
    }
1107

1108
    /**
1109
     * @return array<string, Link>|array<string, array>|string[]|string|null
1110
     */
1111
    public function getUriVariables()
1112
    {
1113
        return $this->uriVariables;
78✔
1114
    }
1115

1116
    /**
1117
     * @param array<string, Link>|array<string, array>|string[]|string|null $uriVariables
1118
     */
1119
    public function withUriVariables($uriVariables): self
1120
    {
1121
        $self = clone $this;
78✔
1122
        $self->uriVariables = $uriVariables;
78✔
1123

1124
        return $self;
78✔
1125
    }
1126

1127
    public function getRoutePrefix(): ?string
1128
    {
1129
        return $this->routePrefix;
78✔
1130
    }
1131

1132
    public function withRoutePrefix(string $routePrefix): self
1133
    {
1134
        $self = clone $this;
×
1135
        $self->routePrefix = $routePrefix;
×
1136

1137
        return $self;
×
1138
    }
1139

1140
    public function getDefaults(): ?array
1141
    {
1142
        return $this->defaults;
78✔
1143
    }
1144

1145
    public function withDefaults(array $defaults): self
1146
    {
1147
        $self = clone $this;
×
1148
        $self->defaults = $defaults;
×
1149

1150
        return $self;
×
1151
    }
1152

1153
    public function getRequirements(): ?array
1154
    {
1155
        return $this->requirements;
78✔
1156
    }
1157

1158
    public function withRequirements(array $requirements): self
1159
    {
1160
        $self = clone $this;
×
1161
        $self->requirements = $requirements;
×
1162

1163
        return $self;
×
1164
    }
1165

1166
    public function getOptions(): ?array
1167
    {
1168
        return $this->options;
78✔
1169
    }
1170

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

1176
        return $self;
×
1177
    }
1178

1179
    public function getStateless(): ?bool
1180
    {
1181
        return $this->stateless;
78✔
1182
    }
1183

1184
    public function withStateless(bool $stateless): self
1185
    {
1186
        $self = clone $this;
×
1187
        $self->stateless = $stateless;
×
1188

1189
        return $self;
×
1190
    }
1191

1192
    public function getSunset(): ?string
1193
    {
1194
        return $this->sunset;
78✔
1195
    }
1196

1197
    public function withSunset(string $sunset): self
1198
    {
1199
        $self = clone $this;
×
1200
        $self->sunset = $sunset;
×
1201

1202
        return $self;
×
1203
    }
1204

1205
    public function getAcceptPatch(): ?string
1206
    {
1207
        return $this->acceptPatch;
78✔
1208
    }
1209

1210
    public function withAcceptPatch(string $acceptPatch): self
1211
    {
1212
        $self = clone $this;
×
1213
        $self->acceptPatch = $acceptPatch;
×
1214

1215
        return $self;
×
1216
    }
1217

1218
    public function getStatus(): ?int
1219
    {
1220
        return $this->status;
78✔
1221
    }
1222

1223
    public function withStatus($status): self
1224
    {
1225
        $self = clone $this;
×
1226
        $self->status = $status;
×
1227

1228
        return $self;
×
1229
    }
1230

1231
    public function getHost(): ?string
1232
    {
1233
        return $this->host;
78✔
1234
    }
1235

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

1241
        return $self;
×
1242
    }
1243

1244
    public function getSchemes(): ?array
1245
    {
1246
        return $this->schemes;
78✔
1247
    }
1248

1249
    public function withSchemes(array $schemes): self
1250
    {
1251
        $self = clone $this;
×
1252
        $self->schemes = $schemes;
×
1253

1254
        return $self;
×
1255
    }
1256

1257
    public function getCondition(): ?string
1258
    {
1259
        return $this->condition;
78✔
1260
    }
1261

1262
    public function withCondition(string $condition): self
1263
    {
1264
        $self = clone $this;
×
1265
        $self->condition = $condition;
×
1266

1267
        return $self;
×
1268
    }
1269

1270
    public function getController(): ?string
1271
    {
1272
        return $this->controller;
78✔
1273
    }
1274

1275
    public function withController(string $controller): self
1276
    {
1277
        $self = clone $this;
×
1278
        $self->controller = $controller;
×
1279

1280
        return $self;
×
1281
    }
1282

1283
    public function getCacheHeaders(): ?array
1284
    {
1285
        return $this->cacheHeaders;
78✔
1286
    }
1287

1288
    public function withCacheHeaders(array $cacheHeaders): self
1289
    {
1290
        $self = clone $this;
78✔
1291
        $self->cacheHeaders = $cacheHeaders;
78✔
1292

1293
        return $self;
78✔
1294
    }
1295

1296
    /**
1297
     * @return string[]|null
1298
     */
1299
    public function getHydraContext(): ?array
1300
    {
1301
        return $this->hydraContext;
78✔
1302
    }
1303

1304
    public function withHydraContext(array $hydraContext): self
1305
    {
1306
        $self = clone $this;
×
1307
        $self->hydraContext = $hydraContext;
×
1308

1309
        return $self;
×
1310
    }
1311

1312
    /**
1313
     * TODO Remove in 4.0.
1314
     *
1315
     * @deprecated
1316
     */
1317
    public function getOpenapiContext(): ?array
1318
    {
1319
        return $this->openapiContext;
78✔
1320
    }
1321

1322
    /**
1323
     * TODO Remove in 4.0.
1324
     *
1325
     * @deprecated
1326
     */
1327
    public function withOpenapiContext(array $openapiContext): self
1328
    {
1329
        $self = clone $this;
×
1330
        $self->openapiContext = $openapiContext;
×
1331

1332
        return $self;
×
1333
    }
1334

1335
    public function getOpenapi(): bool|OpenApiOperation|null
1336
    {
1337
        return $this->openapi;
78✔
1338
    }
1339

1340
    public function withOpenapi(bool|OpenApiOperation $openapi): self
1341
    {
1342
        $self = clone $this;
×
1343
        $self->openapi = $openapi;
×
1344

1345
        return $self;
×
1346
    }
1347

1348
    public function getPaginationViaCursor(): ?array
1349
    {
1350
        return $this->paginationViaCursor;
78✔
1351
    }
1352

1353
    public function withPaginationViaCursor(array $paginationViaCursor): self
1354
    {
1355
        $self = clone $this;
×
1356
        $self->paginationViaCursor = $paginationViaCursor;
×
1357

1358
        return $self;
×
1359
    }
1360

1361
    public function getExceptionToStatus(): ?array
1362
    {
1363
        return $this->exceptionToStatus;
78✔
1364
    }
1365

1366
    public function withExceptionToStatus(array $exceptionToStatus): self
1367
    {
UNCOV
1368
        $self = clone $this;
×
UNCOV
1369
        $self->exceptionToStatus = $exceptionToStatus;
×
1370

UNCOV
1371
        return $self;
×
1372
    }
1373

1374
    public function getQueryParameterValidationEnabled(): ?bool
1375
    {
1376
        return $this->queryParameterValidationEnabled;
78✔
1377
    }
1378

1379
    public function withQueryParameterValidationEnabled(bool $queryParameterValidationEnabled): self
1380
    {
1381
        $self = clone $this;
×
1382
        $self->queryParameterValidationEnabled = $queryParameterValidationEnabled;
×
1383

1384
        return $self;
×
1385
    }
1386

1387
    /**
1388
     * @return GraphQlOperation[]
1389
     */
1390
    public function getGraphQlOperations(): ?array
1391
    {
1392
        return $this->graphQlOperations;
666✔
1393
    }
1394

1395
    public function withGraphQlOperations(array $graphQlOperations): self
1396
    {
1397
        $self = clone $this;
78✔
1398
        $self->graphQlOperations = $graphQlOperations;
78✔
1399

1400
        return $self;
78✔
1401
    }
1402

1403
    public function getLinks(): ?array
1404
    {
1405
        return $this->links;
78✔
1406
    }
1407

1408
    /**
1409
     * @param Link[] $links
1410
     */
1411
    public function withLinks(array $links): self
1412
    {
1413
        $self = clone $this;
×
1414
        $self->links = $links;
×
1415

1416
        return $self;
×
1417
    }
1418
}
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

© 2026 Coveralls, Inc