Class: Wind
Source Location: /Wind.php
Class Wind
Method Summary
static
null
|
autoLoad() |
类文件自动加载方法 callback |
static
void
|
clear() |
清理Wind import变量信息 |
static
string|array('isPackage','fileName','extension','realPath')
|
getRealDir() |
解析路径信息,并返回路径的详情 |
static
string|array('isPackage','fileName','extension','realPath')
|
getRealPath() |
解析路径信息,并返回路径的详情 |
static
string|null
|
import() |
加载一个类或者加载一个包 |
static
void
|
register() |
将路径信息注册到命名空间,该方法不会覆盖已经定义过的命名空间 |
Methods
static null autoLoad(
string
$className, [string
$path = '']
)
|
|
类文件自动加载方法 callback
Parameters:
string |
$className: |
|
string |
$path: |
|
API Tags:
清理Wind import变量信息
API Tags:
返回当前的app应用
Parameters:
API Tags:
static string getAppName(
)
|
|
API Tags:
static string|array getImports(
[string
$key = '']
)
|
|
Parameters:
API Tags:
static string|array('isPackage','fileName','extension','realPath') getRealDir(
$dirPath, [boolean
$absolut = false], string
$filePath
)
|
|
解析路径信息,并返回路径的详情
Parameters:
string |
$filePath: |
路径信息 |
boolean |
$absolut: |
是否返回绝对路径 |
|
$dirPath: |
|
API Tags:
static string|array('isPackage','fileName','extension','realPath') getRealPath(
string
$filePath, [boolean
$suffix = ''], [
$absolut = false]
)
|
|
解析路径信息,并返回路径的详情
Parameters:
string |
$filePath: |
路径信息 |
boolean |
$suffix: |
是否存在文件后缀true,false,default |
|
$absolut: |
|
API Tags:
static string|Ambigous getRootPath(
string
$namespace
)
|
|
返回命名空间的路径信息
Parameters:
API Tags:
Return: | <string, multitype:> |
Access: | public |
static string|null import(
string
$filePath, [boolean
$recursivePackage = false]
)
|
|
加载一个类或者加载一个包
如果加载的包中有子文件夹不进行循环加载 参数格式说明:'WIND:base.WFrontController' WIND 注册的应用名称,应用名称与路径信息用‘:’号分隔 base.WFrontController 相对的路径信息 如果不填写应用名称 ,例如‘base.WFrontController’,那么加载路径则相对于默认的应用路径 加载一个类的参数方式:'WIND:base.WFrontController' 加载一个包的参数方式:'WIND:base.*'
Parameters:
string |
$filePath: |
| 文件路径信息 或者className |
boolean |
$recursivePackage: |
| 当需要加载的路径为文件夹时是否递归它 |
API Tags:
static void register(
string
$path, [
$alias = ''], [boolean
$includePath = false], [boolean
$reset = false], string
$name
)
|
|
将路径信息注册到命名空间,该方法不会覆盖已经定义过的命名空间
Parameters:
string |
$path: |
| 需要注册的路径 |
string |
$name: |
| 路径别名 |
boolean |
$includePath: |
| 是否同时定义includePath |
boolean |
$reset: |
| 是否覆盖已经存在的定义,默认false |
|
$alias: |
|
API Tags:
Information Tags:
static void setImports(
array
$imports
)
|
|
设置imports信息
Parameters:
API Tags:
|
|