$map = Array ('think\log'=>think_path.' think\log.php ','org\util\array'=>think_path. ' org\util\array.php ' ); Think\think::addmap ($MAP);
In the case of the Test\myclass class, the order of precedence for automatic loading is as follows:
1. In alias.php or Addmap method, decide whether to register
The Test\myclass class map, if any, automatically loads the file defined by the class library mapping;
2. Determine if there is a library/test directory, and then load the directory as the initial directory;
3. Determine if there is a registered test root namespace, and then the registered directory for the initial directory load;
4. If none of the above is true, the initial directory load is done with test as the module;
About automatic loading
1. Add any new directory below the library directory = automatically register as a new root namespace.
2. Register the new root namespace.
'Autoload_namespace'=Array ('My'= = Think_path.'My', ' One'= = Think_path.' One',)
new My\Net\IpLocation();
new One\Util\Log();
3. Class Library mappings. Addmap method and alias.ph configuration file.
$map = Array ('think\log'=>think_path.' think\log.php ','org\util\array'=>think_path. ' org\util\array.php ' ); Think\think::addmap ($MAP);
TP Frame Auto-load priority