本文整理汇总了PHP中Status::addStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP Status::addStatus方法的具体用法?PHP Status::addStatus怎么用?PHP Status::addStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Status
的用法示例。
在下文中一共展示了Status::addStatus方法的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);
}
示例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');
}
示例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');
}
}
示例4: getfileAction
/**
* TODO: test
*/
public function getfileAction()
{
$result = array();
$this->_check();
$request = $this->getRequest();
if ($request->isPost() && $request->getPost('file') != NULL) {
$io = new RawIO();
$fileNavigation = new FileNavigation();
$status = new Status();
$status->setUid($this->_user->loggedIn->uid);
if ($fileNavigation->validFile($request->getPost('file'))) {
$io->setFile($fileNavigation->getPath(), $request->getPost('file'));
$status->addStatus('open: /' . $fileNavigation->getDir() . $request->getPost('file'));
$content = $io->getContent();
$editing = $io->getFile();
$path = '/' . $fileNavigation->getDir();
$result['content'] = $content;
$result['filepath'] = $path . $editing;
}
}
$this->_helper->json($result);
}
示例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();
}