예제 #1
0
 /**
  * Class Constructor. Creates plugin shortcuts to commonly
  * used by plugins.
  * 
  * @access private
  * @return nutshell\core\plugin\Plugin
  */
 public function __construct()
 {
     parent::__construct();
     $this->core = Nutshell::getInstance();
     $this->config = $this->core->config->plugin->{ObjectHelper::getBaseClassName($this)};
     $this->plugin = Nutshell::getInstance()->plugin;
     $this->request = Nutshell::getInstance()->request;
 }
예제 #2
0
 public function __construct()
 {
     $this->nutshell = Nutshell::getInstance();
     if (isset($this->nutshell)) {
         $this->plugin = $this->nutshell->plugin;
         if ($connection = $this->nutshell->config->plugin->Mvc->connection) {
             //Make a shortcut reference to the
             $this->db = $this->plugin->Db->{$connection};
         }
     }
     parent::__construct();
 }
예제 #3
0
 public function __construct()
 {
     if (NS_INTERFACE == Nutshell::INTERFACE_HTTP) {
         require __DIR__ . _DS_ . 'handler' . _DS_ . 'Http.php';
         $this->handler = new Http();
     } else {
         if (NS_INTERFACE == Nutshell::INTERFACE_CGI) {
             require __DIR__ . _DS_ . 'handler' . _DS_ . 'Cgi.php';
             $this->handler = new Cgi();
         } else {
             if (NS_INTERFACE == Nutshell::INTERFACE_CLI || NS_INTERFACE == Nutshell::INTERFACE_PHPUNIT) {
                 require __DIR__ . _DS_ . 'handler' . _DS_ . 'Cli.php';
                 $this->handler = new Cli();
             }
         }
     }
     $this->normalizeData();
     $this->rewind();
     parent::__construct();
 }
예제 #4
0
 public function __construct()
 {
     parent::__construct();
     spl_autoload_register(__NAMESPACE__ . '\\Loader::autoload');
 }
예제 #5
0
 public function __construct()
 {
     parent::__construct();
     $this->config = Nutshell::getInstance()->config->plugin->{ObjectHelper::getBaseClassName($this->getParentPlugin())};
 }
예제 #6
0
 /**
  * Constructor. Loads the supplied object in the current instance.
  * 
  */
 public function __construct($obj = null)
 {
     parent::__construct();
     $this->loadObject($obj);
 }