PHP Class Cml\Config

Exibir arquivo Open project: linhecheng/cmlphp Class Usage Examples

Public Properties

Property Type Description
$isLocal string 配置文件类型

Public Methods

Method Description
get ( string $key = null, string $default = null ) : mixed 获取配置参数不区分大小写
init ( )
load ( string $file, boolean $global = true ) : array 从文件载入Config
set ( string | array $key, mixed $value = null ) : null 设置配置【语言】 支持批量设置 /a.b.c方式设置

Method Details

get() public static method

获取配置参数不区分大小写
public static get ( string $key = null, string $default = null ) : mixed
$key string 支持.获取多维数组
$default string 不存在的时候默认值
return mixed

init() public static method

public static init ( )

load() public static method

从文件载入Config
public static load ( string $file, boolean $global = true ) : array
$file string
$global boolean 是否从全局加载
return array

set() public static method

设置配置【语言】 支持批量设置 /a.b.c方式设置
public static set ( string | array $key, mixed $value = null ) : null
$key string | array 要设置的key,为数组时是批量设置
$value mixed 要设置的值
return null

Property Details

$isLocal public_oe static_oe property

配置文件类型
public static string $isLocal
return string