mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 15:54:03 +02:00
Ldap/Query: re-add __toString
We stopped using __toString as it is unable to handle exceptions - and this makes sense. However, that's IMO not a good reason to completely drop __toString. Especially when debugging, benchmarking and similar you often need a quick way to "dump" an object. In that case you are often not in a mood to figure out whether that specific class prefers create(), dump(), render() or whatever. We should not base our view scripts on __toString - at least unless we do not catch Exceptions in __toString methods, eventually "forwarding" them as triggered error where needed.
This commit is contained in:
parent
697d4aff27
commit
316d926811
@ -348,6 +348,11 @@ class Query
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function __toString()
|
||||||
|
{
|
||||||
|
return $this->create();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Descructor
|
* Descructor
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user