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


PHP Status::isOk方法代码示例

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


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

示例1: endStage

 /**
  * @param string $step
  * @param Status $status
  */
 public function endStage($step, $status)
 {
     if ($step == 'extension-tables') {
         $this->endLiveBox();
     }
     $msg = $status->isOk() ? 'config-install-step-done' : 'config-install-step-failed';
     $html = wfMessage('word-separator')->escaped() . wfMessage($msg)->escaped();
     if (!$status->isOk()) {
         $html = "<span class=\"error\">{$html}</span>";
     }
     $this->addHTML($html . "</li>\n");
     if (!$status->isGood()) {
         $this->parent->showStatusBox($status);
     }
 }
开发者ID:Kaph-Noir,项目名称:mediawiki,代码行数:19,代码来源:WebInstallerInstall.php

示例2: showStatusMessage

 public function showStatusMessage(Status $status)
 {
     $warnings = array_merge($status->getWarningsArray(), $status->getErrorsArray());
     if (count($warnings) !== 0) {
         foreach ($warnings as $w) {
             call_user_func_array(array($this, 'showMessage'), $w);
         }
     }
     if (!$status->isOk()) {
         echo "\n";
         exit;
     }
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:13,代码来源:CliInstaller.php

示例3: showStatusBox

 /**
  * Output an error or warning box using a Status object.
  *
  * @param Status $status
  */
 public function showStatusBox($status)
 {
     if (!$status->isGood()) {
         $text = $status->getWikiText();
         if ($status->isOk()) {
             $box = $this->getWarningBox($text);
         } else {
             $box = $this->getErrorBox($text);
         }
         $this->output->addHTML($box);
     }
 }
开发者ID:whysasse,项目名称:kmwiki,代码行数:17,代码来源:WebInstaller.php

示例4: leaveMessage

 /**
  * Leave a message on the user talk page or in the session according to
  * $params['leaveMessage'].
  *
  * @param Status $status
  */
 protected function leaveMessage($status)
 {
     if ($this->params['leaveMessage']) {
         if ($status->isGood()) {
             // @todo FIXME: user->leaveUserMessage does not exist.
             $this->user->leaveUserMessage(wfMessage('upload-success-subj')->text(), wfMessage('upload-success-msg', $this->upload->getTitle()->getText(), $this->params['url'])->text());
         } else {
             // @todo FIXME: user->leaveUserMessage does not exist.
             $this->user->leaveUserMessage(wfMessage('upload-failure-subj')->text(), wfMessage('upload-failure-msg', $status->getWikiText(), $this->params['url'])->text());
         }
     } else {
         wfSetupSession($this->params['sessionId']);
         if ($status->isOk()) {
             $this->storeResultInSession('Success', 'filename', $this->upload->getLocalFile()->getName());
         } else {
             $this->storeResultInSession('Failure', 'errors', $status->getErrorsArray());
         }
         session_write_close();
     }
 }
开发者ID:whysasse,项目名称:kmwiki,代码行数:26,代码来源:UploadFromUrlJob.php

示例5: leaveMessage

 /**
  * Leave a message on the user talk page or in the session according to
  * $params['leaveMessage'].
  *
  * @param Status $status
  */
 protected function leaveMessage($status)
 {
     if ($this->params['leaveMessage']) {
         if ($status->isGood()) {
             // @todo FIXME: user->leaveUserMessage does not exist.
             $this->user->leaveUserMessage(wfMessage('upload-success-subj')->text(), wfMessage('upload-success-msg', $this->upload->getTitle()->getText(), $this->params['url'])->text());
         } else {
             // @todo FIXME: user->leaveUserMessage does not exist.
             $this->user->leaveUserMessage(wfMessage('upload-failure-subj')->text(), wfMessage('upload-failure-msg', $status->getWikiText(), $this->params['url'])->text());
         }
     } else {
         $session = MediaWiki\Session\SessionManager::singleton()->getSessionById($this->params['sessionId']);
         if ($status->isOk()) {
             $this->storeResultInSession($session, 'Success', 'filename', $this->upload->getLocalFile()->getName());
         } else {
             $this->storeResultInSession($session, 'Failure', 'errors', $status->getErrorsArray());
         }
     }
 }
开发者ID:Gomyul,项目名称:mediawiki,代码行数:25,代码来源:UploadFromUrlJob.php


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