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

api-platform / core / 13814792797

12 Mar 2025 03:09PM UTC coverage: 5.889% (-1.4%) from 7.289%
13814792797

Pull #7012

github

web-flow
Merge 199d44919 into 284937039
Pull Request #7012: doc: comment typo in ApiResource.php

10048 of 170615 relevant lines covered (5.89%)

5.17 hits per line

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

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

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

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

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

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

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

1013
        $this->operations = null === $operations ? null : new Operations($operations);
279✔
1014
        $this->provider = $provider;
279✔
1015
        $this->processor = $processor;
279✔
1016
        if (\is_string($types)) {
279✔
1017
            $this->types = (array) $types;
×
1018
        }
1019
    }
1020

1021
    public function getOperations(): ?Operations
1022
    {
1023
        return $this->operations;
612✔
1024
    }
1025

1026
    public function withOperations(Operations $operations): self
1027
    {
1028
        $self = clone $this;
219✔
1029
        $self->operations = $operations;
219✔
1030
        $self->operations->sort();
219✔
1031

1032
        return $self;
219✔
1033
    }
1034

1035
    public function getUriTemplate(): ?string
1036
    {
1037
        return $this->uriTemplate;
90✔
1038
    }
1039

1040
    public function withUriTemplate(string $uriTemplate): self
1041
    {
1042
        $self = clone $this;
×
1043
        $self->uriTemplate = $uriTemplate;
×
1044

1045
        return $self;
×
1046
    }
1047

1048
    public function getTypes(): ?array
1049
    {
1050
        return $this->types;
90✔
1051
    }
1052

1053
    /**
1054
     * @param string[]|string $types
1055
     */
1056
    public function withTypes(array|string $types): self
1057
    {
1058
        $self = clone $this;
6✔
1059
        $self->types = (array) $types;
6✔
1060

1061
        return $self;
6✔
1062
    }
1063

1064
    /**
1065
     * @return array|mixed|string|null
1066
     */
1067
    public function getFormats()
1068
    {
1069
        return $this->formats;
90✔
1070
    }
1071

1072
    public function withFormats(mixed $formats): self
1073
    {
1074
        $self = clone $this;
×
1075
        $self->formats = $formats;
×
1076

1077
        return $self;
×
1078
    }
1079

1080
    /**
1081
     * @return array|mixed|string|null
1082
     */
1083
    public function getInputFormats()
1084
    {
1085
        return $this->inputFormats;
90✔
1086
    }
1087

1088
    /**
1089
     * @param mixed|null $inputFormats
1090
     */
1091
    public function withInputFormats($inputFormats): self
1092
    {
1093
        $self = clone $this;
×
1094
        $self->inputFormats = $inputFormats;
×
1095

1096
        return $self;
×
1097
    }
1098

1099
    /**
1100
     * @return array|mixed|string|null
1101
     */
1102
    public function getOutputFormats()
1103
    {
1104
        return $this->outputFormats;
90✔
1105
    }
1106

1107
    /**
1108
     * @param mixed|null $outputFormats
1109
     */
1110
    public function withOutputFormats($outputFormats): self
1111
    {
1112
        $self = clone $this;
×
1113
        $self->outputFormats = $outputFormats;
×
1114

1115
        return $self;
×
1116
    }
1117

1118
    /**
1119
     * @return array<string, Link>|array<string, array>|string[]|string|null
1120
     */
1121
    public function getUriVariables()
1122
    {
1123
        return $this->uriVariables;
90✔
1124
    }
1125

1126
    /**
1127
     * @param array<string, Link>|array<string, array>|string[]|string|null $uriVariables
1128
     */
1129
    public function withUriVariables($uriVariables): self
1130
    {
1131
        $self = clone $this;
81✔
1132
        $self->uriVariables = $uriVariables;
81✔
1133

1134
        return $self;
81✔
1135
    }
1136

1137
    public function getRoutePrefix(): ?string
1138
    {
1139
        return $this->routePrefix;
90✔
1140
    }
1141

1142
    public function withRoutePrefix(string $routePrefix): self
1143
    {
1144
        $self = clone $this;
×
1145
        $self->routePrefix = $routePrefix;
×
1146

1147
        return $self;
×
1148
    }
1149

1150
    public function getDefaults(): ?array
1151
    {
1152
        return $this->defaults;
90✔
1153
    }
1154

1155
    public function withDefaults(array $defaults): self
1156
    {
1157
        $self = clone $this;
×
1158
        $self->defaults = $defaults;
×
1159

1160
        return $self;
×
1161
    }
1162

1163
    public function getRequirements(): ?array
1164
    {
1165
        return $this->requirements;
90✔
1166
    }
1167

1168
    public function withRequirements(array $requirements): self
1169
    {
1170
        $self = clone $this;
×
1171
        $self->requirements = $requirements;
×
1172

1173
        return $self;
×
1174
    }
1175

1176
    public function getOptions(): ?array
1177
    {
1178
        return $this->options;
90✔
1179
    }
1180

1181
    public function withOptions(array $options): self
1182
    {
1183
        $self = clone $this;
×
1184
        $self->options = $options;
×
1185

1186
        return $self;
×
1187
    }
1188

1189
    public function getStateless(): ?bool
1190
    {
1191
        return $this->stateless;
90✔
1192
    }
1193

1194
    public function withStateless(bool $stateless): self
1195
    {
1196
        $self = clone $this;
×
1197
        $self->stateless = $stateless;
×
1198

1199
        return $self;
×
1200
    }
1201

1202
    public function getSunset(): ?string
1203
    {
1204
        return $this->sunset;
90✔
1205
    }
1206

1207
    public function withSunset(string $sunset): self
1208
    {
1209
        $self = clone $this;
×
1210
        $self->sunset = $sunset;
×
1211

1212
        return $self;
×
1213
    }
1214

1215
    public function getAcceptPatch(): ?string
1216
    {
1217
        return $this->acceptPatch;
90✔
1218
    }
1219

1220
    public function withAcceptPatch(string $acceptPatch): self
1221
    {
1222
        $self = clone $this;
×
1223
        $self->acceptPatch = $acceptPatch;
×
1224

1225
        return $self;
×
1226
    }
1227

1228
    public function getStatus(): ?int
1229
    {
1230
        return $this->status;
90✔
1231
    }
1232

1233
    public function withStatus($status): self
1234
    {
1235
        $self = clone $this;
×
1236
        $self->status = $status;
×
1237

1238
        return $self;
×
1239
    }
1240

1241
    public function getHost(): ?string
1242
    {
1243
        return $this->host;
90✔
1244
    }
1245

1246
    public function withHost(string $host): self
1247
    {
1248
        $self = clone $this;
×
1249
        $self->host = $host;
×
1250

1251
        return $self;
×
1252
    }
1253

1254
    public function getSchemes(): ?array
1255
    {
1256
        return $this->schemes;
90✔
1257
    }
1258

1259
    public function withSchemes(array $schemes): self
1260
    {
1261
        $self = clone $this;
×
1262
        $self->schemes = $schemes;
×
1263

1264
        return $self;
×
1265
    }
1266

1267
    public function getCondition(): ?string
1268
    {
1269
        return $this->condition;
90✔
1270
    }
1271

1272
    public function withCondition(string $condition): self
1273
    {
1274
        $self = clone $this;
×
1275
        $self->condition = $condition;
×
1276

1277
        return $self;
×
1278
    }
1279

1280
    public function getController(): ?string
1281
    {
1282
        return $this->controller;
90✔
1283
    }
1284

1285
    public function withController(string $controller): self
1286
    {
1287
        $self = clone $this;
×
1288
        $self->controller = $controller;
×
1289

1290
        return $self;
×
1291
    }
1292

1293
    public function getHeaders(): ?array
1294
    {
1295
        return $this->headers;
90✔
1296
    }
1297

1298
    public function withHeaders(array $headers): self
1299
    {
1300
        $self = clone $this;
×
1301
        $self->headers = $headers;
×
1302

1303
        return $self;
×
1304
    }
1305

1306
    public function getCacheHeaders(): ?array
1307
    {
1308
        return $this->cacheHeaders;
90✔
1309
    }
1310

1311
    public function withCacheHeaders(array $cacheHeaders): self
1312
    {
1313
        $self = clone $this;
81✔
1314
        $self->cacheHeaders = $cacheHeaders;
81✔
1315

1316
        return $self;
81✔
1317
    }
1318

1319
    /**
1320
     * @return string[]|null
1321
     */
1322
    public function getHydraContext(): ?array
1323
    {
1324
        return $this->hydraContext;
90✔
1325
    }
1326

1327
    public function withHydraContext(array $hydraContext): self
1328
    {
1329
        $self = clone $this;
×
1330
        $self->hydraContext = $hydraContext;
×
1331

1332
        return $self;
×
1333
    }
1334

1335
    public function getOpenapi(): bool|OpenApiOperation|null
1336
    {
1337
        return $this->openapi;
90✔
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;
90✔
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;
90✔
1364
    }
1365

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

1371
        return $self;
×
1372
    }
1373

1374
    /**
1375
     * @return GraphQlOperation[]
1376
     */
1377
    public function getGraphQlOperations(): ?array
1378
    {
1379
        return $this->graphQlOperations;
117✔
1380
    }
1381

1382
    public function withGraphQlOperations(array $graphQlOperations): self
1383
    {
1384
        $self = clone $this;
81✔
1385
        $self->graphQlOperations = $graphQlOperations;
81✔
1386

1387
        return $self;
81✔
1388
    }
1389

1390
    public function getLinks(): ?array
1391
    {
1392
        return $this->links;
90✔
1393
    }
1394

1395
    /**
1396
     * @param Link[] $links
1397
     */
1398
    public function withLinks(array $links): self
1399
    {
1400
        $self = clone $this;
×
1401
        $self->links = $links;
×
1402

1403
        return $self;
×
1404
    }
1405
}
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