Exemplo n.º 1
0
 /**
  * Get project object from
  * session storage
  * @return Designer_Project
  */
 protected function _getProject()
 {
     if (is_null(self::$_poject)) {
         self::$_poject = unserialize($this->_session->get('project'));
     }
     return self::$_poject;
 }
Exemplo n.º 2
0
 /**
  * Get Db_Query_Condition config
  */
 public function loadconditionAction()
 {
     $this->_checkLoaded();
     $query = $this->_session->get('query');
     $id = Request::post('id', 'integer', false);
     if ($id === false) {
         Response::jsonError($this->_lang->WRONG_REQUEST . ' code 2');
     }
     $condition = $query->getCondition($id);
     if ($condition === false) {
         Response::jsonError($this->_lang->WRONG_REQUEST . ' code 3');
     }
     $data = get_object_vars($condition);
     $data['id'] = $id;
     Response::jsonSuccess($data);
 }
Exemplo n.º 3
0
 /**
  * Check if user auth session exists 
  */
 protected function _checkAuthSession()
 {
     if ($this->_session->keyExists('auth') && $this->_session->get('auth') && $this->_session->keyExists('auth_id') && $this->_session->get('auth_id')) {
         $this->setId($this->_session->get('auth_id'));
     }
 }