TriggerError.php 509 Bytes
<?php

namespace WebPlugin;

/**
 * 辅助类
 */
class TriggerError
{
 public static function myErrorHandler($errno, $errstr, $errfile, $errline)
 {
     switch ($errno) {
         case \Yaf\ERR\NOTFOUD\CONTROLLER:
         case \Yaf\ERR\NOTFOUD\MODULE:
         case \Yaf\ERR\NOTFOUD\ACTION:
             header("Not Found");
             break;

         default:
             echo 'ehre';
             echo "Unknown error type: [$errno] $errstr<br />\n";
             break;
     }
     return true;
 }
}