Pimcore\Model\Object\Data\ObjectMetadata::__call PHP Метод

__call() публичный Метод

public __call ( $name, $arguments ) : mixed | void
$name
$arguments
Результат mixed | void
    public function __call($name, $arguments)
    {
        if (substr($name, 0, 3) == "get") {
            $key = strtolower(substr($name, 3, strlen($name) - 3));
            if (in_array($key, $this->columns)) {
                return $this->data[$key];
            }
            throw new \Exception("Requested data {$key} not available");
        }
        if (substr($name, 0, 3) == "set") {
            $key = strtolower(substr($name, 3, strlen($name) - 3));
            if (in_array($key, $this->columns)) {
                $this->data[$key] = $arguments[0];
            } else {
                throw new \Exception("Requested data {$key} not available");
            }
        }
    }