Exemple #1
0
 /**
  * @param $notificationType
  * @param IfwPsn_Wp_Plugin_Bootstrap_Abstract $bootstrap
  * @return mixed
  */
 public function notify($notificationType, IfwPsn_Wp_Plugin_Bootstrap_Abstract $bootstrap)
 {
     $this->_bootstrap = $bootstrap;
     $this->_pm = $bootstrap->getPluginManager();
     switch ($notificationType) {
         case IfwPsn_Wp_Plugin_Bootstrap_Abstract::OBSERVER_PRE_BOOTSTRAP:
             if (method_exists($this, '_preBootstrap')) {
                 $this->_preBootstrap();
             }
             break;
         case IfwPsn_Wp_Plugin_Bootstrap_Abstract::OBSERVER_POST_MODULES:
             if (method_exists($this, '_postModules')) {
                 $this->_postModules();
             }
             break;
         case IfwPsn_Wp_Plugin_Bootstrap_Abstract::OBSERVER_POST_BOOTSTRAP:
             if (method_exists($this, '_postBootstrap')) {
                 $this->_postBootstrap();
             }
             break;
         case IfwPsn_Wp_Plugin_Bootstrap_Abstract::OBSERVER_SHUTDOWN_BOOTSTRAP:
             if (method_exists($this, '_shutdownBootstrap')) {
                 $this->_shutdownBootstrap();
             }
             break;
     }
 }
Exemple #2
0
 /**
  * Bootstraps the plugin
  */
 public function bootstrap()
 {
     // create the plugin bootstrap object
     require_once $this->getPathinfo()->getRootLib() . '/IfwPsn/Wp/Plugin/Bootstrap/Abstract.php';
     $this->_bootstrap = IfwPsn_Wp_Plugin_Bootstrap_Abstract::factory($this);
     $this->_bootstrap->run();
 }