/**
  * Check for arrays
  *
  * @param string  $method
  * @param mixed   $return (reference)
  */
 protected function sanity($method, &$return)
 {
     if ($method == 'rec_query') {
         if (!(is_array($return) && !$this->is_assoc_array($return))) {
             throw new Exception("rec_query must return array");
         }
     } elseif ($method == 'rec_fetch') {
         if (!$this->is_assoc_array($return)) {
             throw new Exception("rec_fetch must return assoc-array");
         }
     } else {
         parent::sanity($method, $return);
     }
 }
 /**
  * Override to allow returning raw strings
  *
  * @param string  $method
  * @param mixed   $return (reference)
  */
 protected function sanity($method, &$return)
 {
     if (!is_string($return)) {
         parent::sanity($method, $return);
     }
 }