Nextras\Orm\Entity\AbstractEntity::internalGetValue PHP Метод

internalGetValue() приватный Метод

private internalGetValue ( PropertyMetadata $metadata, $name )
$metadata Nextras\Orm\Entity\Reflection\PropertyMetadata
    private function &internalGetValue(PropertyMetadata $metadata, $name)
    {
        if (!isset($this->validated[$name])) {
            $this->initProperty($metadata, $name);
        }
        if ($this->data[$name] instanceof IPropertyContainer) {
            return $this->data[$name]->getInjectedValue();
        }
        if ($metadata->hasGetter) {
            $value = call_user_func([$this, $metadata->hasGetter], $metadata->isVirtual ? null : $this->data[$name], $metadata);
        } else {
            $value = $this->data[$name];
        }
        if (!isset($value) && !$metadata->isNullable) {
            $class = get_class($this);
            throw new InvalidStateException("Property {$class}::\${$name} is not set.");
        }
        return $value;
    }