/** * 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; }
public function __get($key) { if ($key == 'model') { return $this->model(); // returns a model loader } elseif ($key == 'logger') { return $this->logger(); // returns a logger } else { parent::__get($key); } }
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(); }
public function __construct() { parent::__construct(); spl_autoload_register(__NAMESPACE__ . '\\Loader::autoload'); }
public function __construct() { parent::__construct(); $this->config = Nutshell::getInstance()->config->plugin->{ObjectHelper::getBaseClassName($this->getParentPlugin())}; }
public static function register() { Component::load(array()); }
/** * Constructor. Loads the supplied object in the current instance. * */ public function __construct($obj = null) { parent::__construct(); $this->loadObject($obj); }