Example #1
0
 /**
  * 静态工厂方法,获取相应的LOG接口类
  * @param string $log_type
  * @author Terry<*****@*****.**>
  * @date 2013-08-29
  * @return object
  */
 public static function factory($logType)
 {
     $className = isset(self::$logClass[$logType]) ? self::$logClass[$logType] : '';
     if (!class_exists($className)) {
         throw new IException('the Log Class is not exists', 403);
     }
     if (!self::$log instanceof ILogs) {
         self::$log = new $className();
     }
     return self::$log;
 }