PHP 5.6.16 is available

The Yaf_Bootstrap_Abstract class

(Não há informação de versão disponível, talvez apenas no SVN)


Bootstrap is a mechanism used to do some intial config before a Application run.

User may define their own Bootstrap class by inheriting Yaf_Bootstrap_Abstract

Any method declared in Bootstrap class with leading "_init", will be called by Yaf_Application::bootstrap() one by one according to their defined order.


Exemplo #1 Bootstrap example

/* bootstrap class should be defined under ./application/Bootstrap.php */
class Bootstrap extends Yaf_Bootstrap_Abstract {
        public function 
_initConfig(Yaf_Dispatcher $dispatcher) {
        public function 
_initPlugin(Yaf_Dispatcher $dispatcher) {

$config = array(
"application" => array(
"directory" => dirname(__FILE__) . "/application/",
$app = new Yaf_Application($config);

O exemplo acima irá imprimir algo similar à:

string(22) "Bootstrap::_initConfig"
string(22) "Bootstrap::_initPlugin"

Sinopse da classe

abstract Yaf_Bootstrap_Abstract {
/* Propriedades */
/* Métodos */
add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top