コード例 #1
0
ファイル: IndexController.php プロジェクト: banyan/alchook
 public function indexAction()
 {
     if ($this->_auth->hasIdentity()) {
         $records = new Application_Model_Records();
         $this->view->records = $records->getByIdentity($this->_auth->getIdentity());
         $this->view->graph_data = Zend_Json::encode($records->getGraphData($this->_auth->getIdentity()));
         $this->view->count = count($this->view->records);
         $this->view->email = $this->_auth->getIdentity();
     }
     $this->view->hasIdentity = $this->_auth->hasIdentity();
 }
コード例 #2
0
ファイル: ApiController.php プロジェクト: banyan/alchook
 public function createAction()
 {
     if (!$this->_auth->hasIdentity()) {
         return;
     }
     if (!$this->getRequest()->isPost()) {
         return;
     }
     if (!($query = $this->_getParam('query'))) {
         return;
     }
     $records = new Application_Model_Records();
     $records->create($query, $this->_auth->getIdentity());
 }