Esempio n. 1
0
File: addon.php Progetto: nob/joi
 /**
  * Initializes object
  *
  * @return Addon
  */
 public function __construct()
 {
     $this->addon_name = $this->getAddonName();
     $this->addon_type = $this->getAddonType();
     $this->addon_path = Path::tidy(Config::getSiteRoot() . Config::getAddonPath($this->addon_name));
     $this->config = $this->getConfig();
     $this->tasks = !$this->skip_tasks ? $this->getTasks() : null;
     // contextual objects
     $this->log = ContextualLog::create($this);
     $this->session = ContextualSession::create($this);
     $this->cache = ContextualCache::create($this);
     $this->css = ContextualCSS::create($this);
     $this->js = ContextualJS::create($this);
     $this->assets = ContextualAssets::create($this);
 }
Esempio n. 2
0
    /**
     * Initializes object
     *
     * @return Addon
     */
    public function __construct()
    {
        $this->addon_name     = $this->parseAddonName();
        $this->addon_type     = $this->parseAddonType();
        $this->addon_path     = Path::tidy(Config::getSiteRoot() . Config::getAddonPath($this->addon_name));
        $this->addon_location = BASE_PATH . '/' . self::find($this->addon_name);
        $this->config         = $this->getConfig();
        $this->tasks          = (!$this->skip_tasks) ? $this->getTasks() : null;
        $this->core           = (!$this->skip_core) ? $this->getCore() : null;

        // contextual objects
        $this->log            = ContextualLog::createObject($this);
        $this->storage        = ContextualStorage::createObject($this);   // save data in long-term file storage, longest storage available
        $this->cache          = ContextualCache::createObject($this);     // save data in volatile file storage
        $this->cookies        = ContextualCookies::createObject($this);   // save data in cookie
        $this->session        = ContextualSession::createObject($this);   // save data in session
        $this->flash          = ContextualFlash::createObject($this);     // save data in flash
        $this->blink          = ContextualBlink::createObject($this);     // save data until page loads, shortest cache available
        $this->tokens         = ContextualTokens::createObject($this);    // create and check tokens for form submission
        $this->css            = ContextualCSS::createObject($this);
        $this->js             = ContextualJS::createObject($this);
        $this->assets         = ContextualAssets::createObject($this);
        $this->addon          = ContextualInteroperability::createObject($this);
    }