. * --------------------------------------------------------------------- */ if (!defined('GLPI_ROOT')) { die("Sorry. You can't access this file directly"); } /** * Database iterator class for Mysql **/ class QueryParam { private $value; /** * Create a query param with a value * * @param string $value Query parameter value, defaults to '?' */ public function __construct($value = '?') { if ($value == null || trim($value) == '') { $value = '?'; } if ($value != '?' && !Toolbox::startsWith($value, ':')) { $value = ':' . $value; } $this->value = $value; } /** * Query parameter value * * @return string */ public function getValue() { return $this->value; } public function __toString() { return $this->getValue(); } }