src/Model/Attribute/Accessor/Entity.php
public function setEntity(?string $entity)
    {
        if (null !== $entity) {
            if (!preg_match('/^[a-z]+$/i', $entity)) {
                throw new DomainException('Entity is not valid.');
            }
        }

        $this->entity = $entity;

        return $this;
    }
public function setEntity(?string $entity)
    {
        if (null !== $entity) {
            if (!preg_match('/^[a-z]+$/i', $entity)) {
                throw new DomainException('Entity is not valid.');
            }
        }

        $this->entity = $entity;

        return $this;
    }
public function setEntity ( ? string $ entity ) { if ( null !== $ entity ) { if ( ! preg_match ( '/^[a-z]+$/i' , $ entity ) ) { throw new DomainException ( 'Entity is not valid.' ) ; } } $ this -> entity = $ entity ; return $ this ; }
Set entity

@param string $entity
@return object
@throws \DomainException
Set entity