Explorar o código

Allows query object to be dumped as a string.

This is one way to solve #881
Valentin Guignon %!s(int64=6) %!d(string=hai) anos
pai
achega
7a4c736a31
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      tripal/includes/TripalFieldQuery.inc

+ 7 - 0
tripal/includes/TripalFieldQuery.inc

@@ -243,4 +243,11 @@ class TripalFieldQuery extends EntityFieldQuery {
       throw new EntityFieldQueryException(t("Field storage engine not found."));
     }
   }
+
+  /**
+   * Allows query object to be dumped as a string.
+   */
+  public function __toString() {
+    return print_r($this, TRUE);
+  }
 }