当前位置: 首页>>代码示例>>PHP>>正文


PHP Status::setUid方法代码示例

本文整理汇总了PHP中Status::setUid方法的典型用法代码示例。如果您正苦于以下问题:PHP Status::setUid方法的具体用法?PHP Status::setUid怎么用?PHP Status::setUid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Status的用法示例。


在下文中一共展示了Status::setUid方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: indexAction

 public function indexAction()
 {
     $status = new Status();
     $status->setUid($this->_user->loggedIn->uid);
     $status->addStatus("test");
     $this->_logger->log($status->getStatusMessages(), Zend_Log::INFO);
 }
开发者ID:reveil,项目名称:CodeTornado,代码行数:7,代码来源:TestController.php

示例2: logoutAction

 public function logoutAction()
 {
     if (isset($this->_user->loggedIn->uid)) {
         $status = new Status();
         $status->setUid($this->_user->loggedIn->uid);
         $status->addStatus('logout');
     }
     $this->_user->logout();
     $this->view->loginMsg = self::LOGOUT;
     $this->_forward('login');
 }
开发者ID:reveil,项目名称:CodeTornado,代码行数:11,代码来源:UserController.php

示例3: openAction

 public function openAction()
 {
     $this->view->projects = $this->_project->getJoinedProjects();
     $request = $this->getRequest();
     if ($request->isGet() && $request->getQuery('pro') !== NULL) {
         $project = $request->getQuery('pro');
         $this->_project->selectProject($project);
         $status = new Status();
         $status->setUid($this->_user->loggedIn->uid);
         $status->addStatus('opened project');
         $this->_redirect('/');
     } else {
         $status = new Status();
         $status->setUid($this->_user->loggedIn->uid);
         $status->addStatus('left for project selection');
     }
 }
开发者ID:reveil,项目名称:CodeTornado,代码行数:17,代码来源:ProjectController.php

示例4: updateAction

 /**
  * Real time update called every X miliseconds defined in scripts.js (5000)
  */
 public function updateAction()
 {
     $this->_check();
     $result = array();
     $branchNavigation = new BranchNavigation();
     $branch = $branchNavigation->getActiveBranch();
     $branches = $branchNavigation->getBranches();
     foreach ($branches as $key => $value) {
         if ($value == $branch) {
             unset($branches[$key]);
         }
     }
     $remotes = new Remotes();
     $remotes->setUid($this->_user->loggedIn->uid);
     $status = new Status();
     $status->setUid($this->_user->loggedIn->uid);
     $recentStatus = $status->getStatusMessages();
     $repos = $remotes->getRepos();
     $result['remotes'] = $remotes->getRemotes();
     $result['avail']['uid'] = array_keys($repos);
     $result['avail']['user'] = array_values($repos);
     $result['status'] = $recentStatus;
     $result['locals'] = array_values($branches);
     $this->_helper->json($result);
 }
开发者ID:reveil,项目名称:CodeTornado,代码行数:28,代码来源:AjaxController.php

示例5: indexAction

 public function indexAction()
 {
     $result = '';
     $request = $this->getRequest();
     $io = new RawIO();
     //handle file navagation
     $validFile = false;
     $fileNavigation = new FileNavigation();
     $branchNavigation = new BranchNavigation();
     $historyNavigation = new HistoryNavigation();
     $remotes = new Remotes();
     $remotes->setUid($this->_user->loggedIn->uid);
     $status = new Status();
     $status->setUid($this->_user->loggedIn->uid);
     $git = new Git();
     if ($request->isGet()) {
         //===begin file navigation===
         if ($request->getQuery('updir') != NULL) {
             $updirs = (int) $request->getQuery('updir');
             $fileNavigation->upDir($updirs);
         }
         if ($request->getQuery('dir') != NULL) {
             $fileNavigation->enterDir($request->getQuery('dir'));
         }
         if ($request->getQuery('file') != NULL) {
             if ($fileNavigation->validFile($request->getQuery('file'))) {
                 $io->setFile($fileNavigation->getPath(), $request->getQuery('file'));
                 $status->addStatus('open: /' . $fileNavigation->getDir() . $request->getQuery('file'));
             }
         }
         //===end file navigation===
         if ($request->getQuery('branch') != NULL) {
             $result = $branchNavigation->setBranch($request->getQuery('branch'));
             $status->addStatus('branch: ' . $request->getQuery('branch'));
         }
         if ($request->getQuery('sha') != NULL) {
             $result = $historyNavigation->setRev($request->getQuery('sha'));
             $status->addStatus('history: ' . $request->getQuery('sha'));
         }
         //===begin merger===
         if ($request->getQuery('merge') != NULL) {
             $result = $git->merge($request->getQuery('merge'));
             $status->addStatus('merge: ' . $request->getQuery('merge'));
         }
         if ($request->getQuery('pull') != NULL) {
             $result = $remotes->pullRemote($request->getQuery('pull'));
             $status->addStatus('pull: ' . $request->getQuery('pull'));
         }
         if ($request->getQuery('avail') != NULL) {
             $result = $remotes->addRemote($request->getQuery('avail'));
             $status->addStatus('add remote: ' . $request->getQuery('avail'));
         }
         //===end merger===
     }
     if (isset($_POST['code'])) {
         $code = $_POST['code'];
         if ($io->getFile() !== NULL) {
             $io->saveContent($code);
             $status->addStatus('save: ' . $io->getFile());
         }
         if (isset($_POST['commitMessage']) && $_POST['commitMessage'] != '') {
             $msg = $_POST['commitMessage'];
             $result = $git->autoCommit($msg);
             $status->addStatus('commit: ' . $msg);
         }
     }
     $this->view->result = $result;
     $this->view->content = $io->getContent();
     $this->view->editing = $io->getFile();
     $this->view->path = '/' . $fileNavigation->getDir();
     $this->view->files = $fileNavigation->ls();
     $this->view->branch = $branchNavigation->getActiveBranch();
     $this->view->branches = $branchNavigation->getBranches();
     $this->view->state = $branchNavigation->getState();
     $this->view->history = $historyNavigation->getHistory();
     $this->view->headName = $historyNavigation->getHeadName();
     $this->view->status = $status->getStatusMessages();
     $this->view->avail = $remotes->getRepos();
     $this->view->remotes = $remotes->getRemotes();
     $this->view->newFileForm = new NewFileForm();
     $this->view->newDirForm = new NewDirForm();
     $this->view->newBranchForm = new NewBranchForm();
 }
开发者ID:reveil,项目名称:CodeTornado,代码行数:83,代码来源:IndexController.php


注:本文中的Status::setUid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。