Beispiel #1
0
 /**
  * Throws an exception with any PHP errors from including $fileIncluded.
  * The static $_errors property is cleared prior to throwing the exception.
  * If there are no errors to report, then this method does nothing.
  *
  * @param  string $fileIncluded
  * @return void
  * @throws Zend_Exception
  */
 protected static function _throwIncludeErrors($fileIncluded)
 {
     if (self::$_errors === array()) {
         return;
     }
     $message = "At least one error occurred including \"{$fileIncluded}\"; see includeErrors property";
     /**
      * @see Zend_Exception
      */
     require_once 'Zend/Exception.php';
     $exception = new Zend_Exception($message);
     $exception->includeErrors = array();
     foreach (self::$_errors as $error) {
         $exception->includeErrors[] = $error;
     }
     self::$_errors = array();
     throw $exception;
 }