(No version information available, might only be in Git)
Bootstrap锟斤拷锟斤拷锟斤拷锟斤拷Application锟斤拷锟斤拷(run)之前锟斤拷一些锟斤拷始锟斤拷锟斤拷锟斤拷锟侥伙拷锟斤拷.
锟斤拷锟斤拷锟酵拷锟斤拷坛锟�Yaf_Bootstrap_Abstract 锟斤拷锟斤拷锟斤拷锟皆硷拷锟斤拷Bootstrap锟斤拷.
锟斤拷Bootstrap锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷"_init"锟斤拷头锟侥癸拷锟叫的凤拷锟斤拷, 锟斤拷锟结被锟斤拷锟秸讹拷锟斤拷顺锟斤拷锟斤拷锟斤拷锟斤拷Yaf_Application::bootstrap() 锟斤拷锟斤拷锟矫碉拷时锟教碉拷锟斤拷.
Example #1 Bootstrap example
<?php
/* bootstrap class should be defined under ./application/Bootstrap.php */
class Bootstrap extends Yaf_Bootstrap_Abstract {
public function _initConfig(Yaf_Dispatcher $dispatcher) {
var_dump(__METHOD__);
}
public function _initPlugin(Yaf_Dispatcher $dispatcher) {
var_dump(__METHOD__);
}
}
$config = array(
"application" => array(
"directory" => dirname(__FILE__) . "/application/",
),
);
$app = new Yaf_Application($config);
$app->bootstrap();
?>
锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�
string(22) "Bootstrap::_initConfig" string(22) "Bootstrap::_initPlugin"