コード例 #1
0
 /**
  * Check for Doctrine class types
  *
  * @param string  $method
  * @param mixed   $return (reference)
  */
 protected function sanity($method, &$return)
 {
     if ($method == 'rec_query') {
         if (!is_a($return, 'Doctrine_Query')) {
             throw new Exception("rec_query must return Doctrine_Query");
         }
     } elseif ($method == 'rec_fetch') {
         if (!is_a($return, 'Doctrine_Record')) {
             throw new Exception("rec_fetch must return Doctrine_Record");
         }
     } else {
         parent::sanity($method, $return);
     }
 }