/**
  * 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');
     }
 }
Exemplo n.º 2
0
 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;
     }
 }
Exemplo n.º 3
0
 /**
  * @see Subjects::__construct()
  */
 public function __construct()
 {
     \tao_helpers_Context::load('STANDALONE_MODE');
     parent::__construct();
 }