phprs\Router::__construct PHP Method

__construct() public method

public __construct ( )
    function __construct()
    {
        //AutoClassLoader确保序列化后自动加载类文件
        $this->class_loader = new AutoClassLoader();
        ClassLoader::addInclude($this->api_path);
        //TODO: 支持名字空间
        //TODO: 支持多路径多类名
        $this->load($this->api_path, $this->apis, $this->api_method);
        //允许通过接口访问api信息
        if ($this->export_apis) {
            $this->loadApi($this->routes, __DIR__ . '/apis/ApiExporter.php', 'phprs\\apis\\ApiExporter');
        }
    }