示例#1
0
 /**
  * Constructor performs initializations actions
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->userService = tao_models_classes_UserService::singleton();
     $this->defaultData();
     $extManager = common_ext_ExtensionsManager::singleton();
 }
 public function __construct()
 {
     parent::__construct();
     $authAdapter = new tao_models_classes_HttpBasicAuthAdapter(common_http_Request::currentRequest());
     try {
         $user = $authAdapter->authenticate();
         $session = new common_session_RestSession($user);
         \common_session_SessionManager::startSession($session);
     } catch (common_user_auth_AuthFailedException $e) {
         $this->requireLogin();
     }
     /*
     	    $this->headers = tao_helpers_Http::getHeaders();
     	    $this->files = tao_helpers_Http::getFiles();
     */
     if ($this->hasHeader("Accept")) {
         try {
             $this->responseEncoding = tao_helpers_Http::acceptHeader($this->acceptedMimeTypes, $this->getHeader("Accept"));
         } catch (common_exception_ClientException $e) {
             $this->returnFailure($e);
         }
     }
     if ($this->hasHeader("Accept-Language")) {
         try {
         } catch (common_exception_ClientException $e) {
             $this->returnFailure($e);
         }
     }
     header('Content-Type: ' . $this->responseEncoding);
     //check auth method requested
     /**/
 }
 /**
  * constructor
  *
  * @author Patrick Plichart, <*****@*****.**>
  */
 public function __construct()
 {
     parent::__construct();
     $this->service = StatisticsService::singleton();
     $this->defaultData();
     //TODO define a hook for implemeitng differently the report structure with an interface
     $this->reportService = ReportService::singleton();
 }
示例#4
0
 /**
  * Constructor performs initializations actions
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     //add List stylesheet
     tao_helpers_Scriptloader::addCssFile(TAOBASE_WWW . 'css/lists.css');
     $this->service = tao_models_classes_ListService::singleton();
     $this->defaultData();
 }
 public function __construct()
 {
     parent::__construct();
     $this->service = ResultsService::singleton();
 }
示例#6
0
 /**
  * constructor. Initialize the context
  */
 public function __construct()
 {
     parent::__construct();
     $this->rootFolder = sys_get_temp_dir();
 }
 /**
  * initialize the services
  */
 public function __construct()
 {
     parent::__construct();
 }
示例#8
0
 public function __construct()
 {
     parent::__construct();
     $this->defaultData();
 }
 /**
  * initialize the services
  */
 public function __construct()
 {
     parent::__construct();
     $this->userService = \tao_models_classes_UserService::singleton();
 }
 public function __construct()
 {
     parent::__construct();
     $this->service = taoUpdate_models_classes_DataMigrationService::singleton();
     common_log_Dispatcher::singleton()->init(array(array('class' => 'SingleFileAppender', 'format' => '[%s] %m', 'threshold' => common_Logger::TRACE_LEVEL, 'file' => self::getTemplatePath('update.log'))));
 }
 /**
  * initialize the services
  */
 public function __construct()
 {
     parent::__construct();
     $this->dataAccess = new DataBaseAccess();
 }
 /**
  * constructor: initialize the service and the default data
  * @return  Items
  */
 public function __construct()
 {
     parent::__construct();
     //the service is initialized by default
 }