\sRConfig

Summary

Methods
Properties
Constants
__construct()
readPhp()
readIni()
readJson()
__get()
__set()
value()
hasKey()
getData()
No public properties found
No constants found
parseOptions()
readFile()
$data
N/A
No private methods found
No private properties found
N/A

Properties

$data

$data : 

Type

Methods

__construct()

__construct(array|string  $opts = array()) 

Config constructor.

Parameters

array|string $opts

readPhp()

readPhp(  $name) 

读取php原生配置文件

Parameters

$name

readIni()

readIni(  $filename) 

Parameters

$filename

readJson()

readJson(  $filename) 

Parameters

$filename

__get()

__get(  $name) : mixed|null

简单值获取

Parameters

$name

Returns

mixed|null

__set()

__set(  $name,   $value) 

Parameters

$name
$value

value()

value(string|array  $key, null  $value = null) : $this|mixed|null

配置文件值获取或者设置;支持多级

Parameters

string|array $key
null $value

Returns

$this|mixed|null

hasKey()

hasKey(string  $key) : boolean

键值存在检测

Parameters

string $key

Returns

boolean

getData()

getData() : array

获取配置文件参数

Returns

array

parseOptions()

parseOptions(array|string  $opts) 

Parameters

array|string $opts

readFile()

readFile(string  $name) : array

文件读取

Parameters

string $name

Returns

array