vendor/api-platform/core/src/Documentation/Documentation.php line 23

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the API Platform project.
  4.  *
  5.  * (c) Kévin Dunglas <dunglas@gmail.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace ApiPlatform\Documentation;
  12. use ApiPlatform\Metadata\Resource\ResourceNameCollection;
  13. /**
  14.  * Generates the API documentation.
  15.  *
  16.  * @author Amrouche Hamza <hamza.simperfit@gmail.com>
  17.  */
  18. final class Documentation implements DocumentationInterface
  19. {
  20.     public function __construct(private readonly ResourceNameCollection $resourceNameCollection, private readonly string $title '', private readonly string $description '', private readonly string $version '')
  21.     {
  22.     }
  23.     public function getVersion(): string
  24.     {
  25.         return $this->version;
  26.     }
  27.     public function getDescription(): string
  28.     {
  29.         return $this->description;
  30.     }
  31.     public function getTitle(): string
  32.     {
  33.         return $this->title;
  34.     }
  35.     public function getResourceNameCollection(): ResourceNameCollection
  36.     {
  37.         return $this->resourceNameCollection;
  38.     }
  39. }