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

        if (!$this->hasField($prop)) {
            return false;
        }

        $prop = $this->asProp($prop);

        if (!property_exists($this, $prop)) {
            $e = sprintf('Prop `%s` of entity `%s` was not defined.', $prop, get_class($this));

            throw new InvalidArgumentException($e);
        }

        return true;
    }
protected function hasProp(string $prop): bool
    {
        $prop = $this->normalize($prop);

        if (!$this->hasField($prop)) {
            return false;
        }

        $prop = $this->asProp($prop);

        if (!property_exists($this, $prop)) {
            $e = sprintf('Prop `%s` of entity `%s` was not defined.', $prop, get_class($this));

            throw new InvalidArgumentException($e);
        }

        return true;
    }
是否存在属性.

@param string $prop

@return bool