\PhalApi\ConfigYaconfConfig

YaconfConfig Yaconf扩展配置类

  • 通过Yaconf扩展快速获取配置

使用示例:

<code>
$config = new YaconfConfig();

var_dump($config->get('foo')); //相当于var_dump(Yaconf::get("foo"));

var_dump($config->has('foo')); //相当于var_dump(Yaconf::has("foo"));
</code>

Summary

Methods
Properties
Constants
get()
has()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

get()

get(  $key, mixed  $default = NULL) : mixed

获取配置

Parameters

$key

string 配置键值

mixed $default

缺省值

Returns

mixed —

需要获取的配置值,不存在时统一返回$default

has()

has(  $key) 

Parameters

$key