Пример #1
0
 public static function addMap($class, $map = '')
 {
     if (is_array($class)) {
         self::$map = array_merge(self::$map, $class);
     } else {
         self::$map[$class] = $map;
     }
 }
Пример #2
0
 public static function addNamespace($namespace, $path = '')
 {
     if (is_array($namespace)) {
         self::$namespace = array_merge(self::$namespace, $namespace);
     } else {
         self::$namespace[$namespace] = $path;
     }
 }
Пример #3
0
 public static function addNamespaceAlias($namespace, $original = '')
 {
     if (is_array($namespace)) {
         self::$namespaceAlias = array_merge(self::$namespace, $namespace);
     } else {
         self::$namespaceAlias[$namespace] = $original;
     }
 }
Пример #4
0
 /**
  * 初始化类的实例
  * @return void
  */
 public static function clearInstance()
 {
     self::$instance = [];
 }