(Yaf >=1.0.0)
Yaf_Config_Simple::toArray — 以数组形式导出配置
此函数没有参数。
以数组形式表示的配置数据。
示例 #1 Yaf_Config_Simple::toArray() 示例
<?php
$config = new Yaf_Config_Simple([
'application' => ['name' => 'MyApp'],
'database' => ['host' => 'localhost', 'port' => 3306],
]);
print_r($config->toArray());
?>以上示例的输出类似于:
Array
(
[application] => Array
(
[name] => MyApp
)
[database] => Array
(
[host] => localhost
[port] => 3306
)
)