Config

配置信息

注册配置文件的路径,在需要的时候再加载

package

Tango

author

Zheng Kai zhengkai@gmail.com

Methods

setFile 和 setFileDefault 的公共部分

_setFile(string $sName, string $sPath, boolean $bDefault = FALSE) : boolean
static
static
access

protected

throws

Arguments

$sName

string

配置的命名空间

$sPath

string

配置文件的路径

$bDefault

boolean

是否是缺省配置

Response

boolean

获取配置

get(string $sName) : array
static
static
access

public

Arguments

$sName

string

配置的命名空间

Response

array

获取配置文件的路径

getFile(string $sName) : array
static
static
access

public

Arguments

$sName

string

配置的命名空间

Response

array

设定“配置文件”的路径,只有在需要的时候才去读取配置

setFile(string $sName, string $sPath) : void
static
static
access

public

Arguments

$sName

string

配置的命名空间

$sPath

string

配置文件的路径

设定“配置文件”的默认路径

setFileDefault(string $sName, string $sPath) : void
static

这个方法通常是在定义类的文件里出现,确保所有初始值已经有了,而避免找不到 key 出现 php notice 可以参考 Drive\DB.php 文件开头的用法

see \Tango\Drive\DB

class

static
access

public

Arguments

$sName

string

配置的命名空间

$sPath

string

配置文件的路径

Properties

已读取的配置信息

_lStore : 
static

Type(s)

命名对应的文件列表

_lFile : 
static

Type(s)

命名对应的缺省文件列表

_lFileDefault : 
static

Type(s)