src/Leevel/Database/Ddd/Entity.php
protected function validate(string $prop): void
    {
        $prop = $this->normalize($prop);

        if (!$this->hasProp($prop)) {
            $e = sprintf('Entity `%s` prop or field of struct `%s` was not defined.', get_class($this), $prop);

            throw new InvalidArgumentException($e);
        }
    }
protected function validate(string $prop): void
    {
        $prop = $this->normalize($prop);

        if (!$this->hasProp($prop)) {
            $e = sprintf('Entity `%s` prop or field of struct `%s` was not defined.', get_class($this), $prop);

            throw new InvalidArgumentException($e);
        }
    }
验证 getter setter 属性.

@param string $prop