vendor/doctrine/orm/src/Mapping/Entity.php line 18

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Doctrine\ORM\Mapping;
  4. use Attribute;
  5. use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
  6. use Doctrine\ORM\EntityRepository;
  7. /**
  8.  * @Annotation
  9.  * @NamedArgumentConstructor()
  10.  * @Target("CLASS")
  11.  * @template T of object
  12.  */
  13. #[Attribute(Attribute::TARGET_CLASS)]
  14. final class Entity implements MappingAttribute
  15. {
  16.     /**
  17.      * @var class-string<EntityRepository<T>>|null
  18.      * @readonly
  19.      */
  20.     public $repositoryClass;
  21.     /**
  22.      * @var bool
  23.      * @readonly
  24.      */
  25.     public $readOnly false;
  26.     /** @phpstan-param class-string<EntityRepository<T>>|null $repositoryClass */
  27.     public function __construct(?string $repositoryClass nullbool $readOnly false)
  28.     {
  29.         $this->repositoryClass $repositoryClass;
  30.         $this->readOnly        $readOnly;
  31.     }
  32. }