From 43848989aea3fa3a692a8ec0b43f92548cb0fdc3 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 3 Dec 2015 13:54:48 +0100 Subject: [PATCH] RepositoryQuery: Add method __toString() --- library/Icinga/Repository/RepositoryQuery.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/library/Icinga/Repository/RepositoryQuery.php b/library/Icinga/Repository/RepositoryQuery.php index 4c24c8617..f5818bf58 100644 --- a/library/Icinga/Repository/RepositoryQuery.php +++ b/library/Icinga/Repository/RepositoryQuery.php @@ -73,6 +73,16 @@ class RepositoryQuery implements QueryInterface, SortRules, FilterColumns, Itera $this->iterator = clone $this->iterator; } + /** + * Return a string representation of this query + * + * @return string + */ + public function __toString() + { + return (string) $this->query; + } + /** * Return the real query being used *