把对象转换为数组
public function toArray(void)
此函数没有参数
如果是对象,则返回被转换的数组
其他类型不进行任何转换
<?php
$configs = array(
'asf' => array(
'root_path' => realpath(dirname(__FILE__)),
)
);
class IndexService
{
public function indexAction()
{
var_dump(Asf_Config::get()->toArray());
}
}
$handle = new Asf_Application($configs);
$handle->run();