mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-16 10:24:27 +02:00
Livestatus\Query: split string cast implementation
This way we can use an exception-throwing variant internally while not breaking __toString
This commit is contained in:
parent
38fec33849
commit
0916f57ce8
@ -38,8 +38,24 @@ class Query extends SimpleQuery
|
||||
$this->count = true;
|
||||
return $this;
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Automagic string casting
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return $this->toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Render query string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toString()
|
||||
{
|
||||
if ($this->table === null) {
|
||||
throw new IcingaException('Table is required');
|
||||
|
Loading…
x
Reference in New Issue
Block a user