data["value"]; } function getName(): string { return $this->data["name"]; } function getTitle(): string { return $this->data["title"]; } public function eval(IContext $context) { $expr = $this->getValue(); if (func::is_static($expr) || func::is_method($expr)) { return $context->callMethod($expr); } elseif (is_string($expr)) { $prefix = substr($expr, 0, 1); if ($prefix == "*") { # session return $context->getSession(substr($expr, 1)); } elseif ($prefix == "+") { # config return $context->getConfig(substr($expr, 1)); } # valeur à récupérer du contexte return $context->getValue($expr); } throw ValueException::unexpected_type(["string", "callable"], $expr); } }