. * --------------------------------------------------------------------- */ if (!defined('GLPI_ROOT')) { die("Sorry. You can't access this file directly"); } /** * Query expression class **/ class QueryExpression { private $expression; /** * Create a query expression * * @param string $value Query parameter value, defaults to '?' */ public function __construct($expression) { if (empty($expression)) { throw new \RuntimeException('Cannot build an empty expression'); } $this->expression = $expression; } /** * Query expression value * * @return string */ public function getValue() { return $this->expression; } public function __toString() { return $this->getValue(); } }