/** * Initialize the context * @param string $extension * @param array $options */ public function __construct($extension, $options = array()) { common_Profiler::singleton()->register(); $this->extension = common_ext_ExtensionsManager::singleton()->getExtensionById($extension); if (PHP_SAPI == 'cli') { tao_helpers_Context::load('SCRIPT_MODE'); } else { tao_helpers_Context::load('APP_MODE'); } }
public function __construct() { parent::__construct(); if ($this->hasRequestParameter('standalone') && $this->getRequestParameter('standalone')) { tao_helpers_Context::load('STANDALONE_MODE'); $this->isStandAlone = true; $this->setData('client_config_url', $this->getClientConfigUrl()); common_Logger::d('Standalone mode set'); } else { $this->isStandAlone = false; } }
/** * @see Subjects::__construct() */ public function __construct() { \tao_helpers_Context::load('STANDALONE_MODE'); parent::__construct(); }