• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Status类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __equal

 public function __equal(Status $_status)
 {
     if ($this->id == $_status->getId() && strcmp($this->name, $_status->getName()) == 0 && strcmp($this->number, $_status->getNumber()) == 0) {
         return TRUE;
     }
     return FALSE;
 }
开发者ID:SProjects,项目名称:Bug-Tracker,代码行数:7,代码来源:Status.php


示例2: efSharedHelpArticleCreation

/**
 * @param WikiPage $article
 * @param $user
 * @param $text
 * @param $summary
 * @param $minoredit
 * @param $watchthis
 * @param $sectionanchor
 * @param $flags
 * @param $revision
 * @param Status $status
 * @param $baseRevId
 * @return bool
 */
function efSharedHelpArticleCreation(&$article, &$user, $text, $summary, $minoredit, $watchthis, $sectionanchor, &$flags, $revision, &$status, $baseRevId)
{
    global $wgCityId, $wgHelpWikiId;
    // only run on help wikis
    if ($wgCityId !== $wgHelpWikiId) {
        return true;
    }
    // not likely if we got here, but... healthy paranoia ;)
    if (wfReadOnly()) {
        return true;
    }
    if ($article->mTitle->getNamespace() !== NS_HELP) {
        return true;
    }
    if (!$status->isOK()) {
        return true;
    }
    if (!($flags & EDIT_NEW)) {
        return true;
    }
    $talkTitle = Title::newFromText($article->mTitle->getText(), NS_HELP_TALK);
    if ($talkTitle->exists()) {
        return true;
    }
    $talkArticle = new Article($talkTitle);
    $redir = $article->getRedirectTarget();
    if ($redir) {
        $target = $redir->getTalkNsText() . ':' . $redir->getText();
        $talkArticle->doEdit("#REDIRECT [[{$target}]]", wfMsgForContent('sharedhelp-autotalkcreate-summary'));
    } else {
        $talkArticle->doEdit('{{talkheader}}', wfMsgForContent('sharedhelp-autotalkcreate-summary'));
    }
    return true;
}
开发者ID:Tjorriemorrie,项目名称:app,代码行数:48,代码来源:SharedHelpArticleCreation.php


示例3: statusComparator

 /**
  * Callable used to order Status.
  *
  * @param Status $s1
  * @param Status $s2
  *
  * @return int
  */
 private function statusComparator($s1, $s2)
 {
     if (array_search($s1->getCode(), $this->statusOrder) === array_search($s2->getCode(), $this->statusOrder)) {
         return 0;
     }
     return array_search($s1->getCode(), $this->statusOrder) < array_search($s2->getCode(), $this->statusOrder) ? -1 : 1;
 }
开发者ID:postalservice14,项目名称:php-actuator,代码行数:15,代码来源:OrderedHealthAggregator.php


示例4: filterMergedContent

 /**
  * Hook function for EditFilterMergedContent
  *
  * @param IContextSource $context
  * @param Content        $content
  * @param Status         $status
  * @param string         $summary
  * @param User           $user
  * @param bool           $minoredit
  *
  * @return bool
  */
 static function filterMergedContent(IContextSource $context, Content $content, Status $status, $summary, User $user, $minoredit)
 {
     $title = $context->getTitle();
     if (isset($title->spamBlackListFiltered) && $title->spamBlackListFiltered) {
         // already filtered
         return true;
     }
     // get the link from the not-yet-saved page content.
     // no need to generate html to get external links
     $pout = $content->getParserOutput($title, null, null, false);
     $links = array_keys($pout->getExternalLinks());
     // HACK: treat the edit summary as a link
     if ($summary !== '') {
         $links[] = $summary;
     }
     $spamObj = BaseBlacklist::getInstance('spam');
     $matches = $spamObj->filter($links, $title);
     if ($matches !== false) {
         $status->fatal('spamprotectiontext');
         foreach ($matches as $match) {
             $status->fatal('spamprotectionmatch', $match);
         }
     }
     // Always return true, EditPage will look at $status->isOk().
     return true;
 }
开发者ID:whysasse,项目名称:kmwiki,代码行数:38,代码来源:SpamBlacklistHooks.php


示例5: do_post_testphp_example_v1

 function do_post_testphp_example_v1($job, $resp)
 {
     $status = new Status($resp->status());
     $status->add_message("this is a status message!");
     throw new ERR_INTERNAL_SERVER_ERROR("uh oh");
     return Worker::WORKER_SUCCESS;
 }
开发者ID:wqx081,项目名称:gearbox,代码行数:7,代码来源:workerTestPhp.php


示例6: insertComments

 protected function insertComments(User $aUser)
 {
     $status = new Status();
     $status->insert(array("user_id" => $aUser->id, "comment" => "comment1", "created_at" => "2008-01-01 00:00:00"));
     $status->insert(array("user_id" => $aUser->id, "comment" => "comment2", "created_at" => "2008-02-01 00:00:00"));
     $status->insert(array("user_id" => $aUser->id, "comment" => "comment3", "created_at" => "2008-03-01 00:00:00"));
 }
开发者ID:hamaco,项目名称:phwittr-on-xoops,代码行数:7,代码来源:Status.php


示例7: fromXml

 /**
  * @internal
  *
  * @param \SimpleXMLElement $xml
  *
  * @return Status
  */
 public static function fromXml(\SimpleXMLElement $xml)
 {
     $status = new Status();
     $status->setIsResponse();
     $status->setCode($xml->Code)->setDescription($xml->Description);
     return $status;
 }
开发者ID:camigreen,项目名称:ttop,代码行数:14,代码来源:Status.php


示例8: 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


示例9: deserialize

 public function deserialize(&$data)
 {
     parent::deserialize($data);
     $this->stringToBytes($this->username);
     $hash = new Status();
     $hash->deserialize($data);
     $this->status = $hash;
 }
开发者ID:BackupTheBerlios,项目名称:btg-svn,代码行数:8,代码来源:initconnection.php


示例10: __construct

 /**
  * @param integer|Status $status
  */
 public function __construct($status)
 {
     if ($status instanceof self) {
         $this->status = $status->getValue();
     } else {
         $this->status = (int) $status;
     }
 }
开发者ID:afk11,项目名称:transmission-php,代码行数:11,代码来源:Status.php


示例11: test_it_gets_current_status_data

 function test_it_gets_current_status_data()
 {
     $locater = $this->getMockBuilder('\\Bdsm\\Locater\\Locater')->getMock();
     $locater->method('findMigrations')->willReturn(array(new DoneMigration1(), new DoneMigration2(), new NewMigration(), new SkippedMigration()));
     $log = $this->getMockBuilder('\\Bdsm\\Log\\Log')->getMock();
     $log->method('get')->willReturn(array('Bdsm\\Query\\DoneMigration1' => 'done', 'Bdsm\\Query\\DoneMigration2' => 'done', 'Bdsm\\Query\\SkippedMigration' => 'skipped'));
     $query = new Status($locater, $log);
     $this->assertEquals(array('Bdsm\\Query\\DoneMigration1' => 'done', 'Bdsm\\Query\\DoneMigration2' => 'done', 'Bdsm\\Query\\NewMigration' => 'new', 'Bdsm\\Query\\SkippedMigration' => 'skipped'), $query->getResult());
 }
开发者ID:turanct,项目名称:bdsm,代码行数:9,代码来源:StatusTest.php


示例12: equals

 /**
  * @param Status $status
  * @return bool
  */
 public function equals(Status $status)
 {
     if ($this == $status) {
         return true;
     }
     if ($this->status == $status->getValue()) {
         return true;
     }
     return false;
 }
开发者ID:northdakota,项目名称:DiamanteDeskBundle,代码行数:14,代码来源:Status.php


示例13: remove

 /**
  * @userCache
  *
  * @param int $userId   ユーザID
  * @param int $statusId ステータスID
  *
  * @return Logics_Result
  */
 public function remove($userId, $statusId)
 {
     $result = new Logics_Result();
     $aStatus = new Status($statusId);
     if ($aStatus->isSelected() && $aStatus->user_id === $userId) {
         $aStatus->delete();
     } else {
         $result->failure();
     }
     return $result;
 }
开发者ID:hamaco,项目名称:phwittr-on-xoops,代码行数:19,代码来源:Status.php


示例14: 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


示例15: onPageContentSave

 /**
  * @param $wikiPage
  * @param \User $user
  * @param $content
  * @param $summary
  * @param $isMinor
  * @param $isWatch
  * @param $section
  * @param $flags
  * @param \Status $status
  *
  * @return bool
  */
 public function onPageContentSave($wikiPage, $user, $content, $summary, $isMinor, $isWatch, $section, $flags, $status)
 {
     if ($user && !$user->isEmailConfirmed()) {
         if (!$this->testResponse()) {
             $status->setResult(false);
             $status->error("recaptcha-failed");
             return false;
         }
     }
     return true;
 }
开发者ID:addshore,项目名称:reCaptcha,代码行数:24,代码来源:reCaptcha.hooks.php


示例16: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('cs_status')->delete();
     $status = array("Open", "In Progress", "Close", "Cancel");
     foreach ($status as $stt) {
         $status = new Status();
         $status->name = $stt;
         $status->description = "Lorem Ipsum has been the dummy text ever since the 1500s";
         $status->save();
     }
 }
开发者ID:vnzacky,项目名称:exp_services,代码行数:16,代码来源:StatusSeeder.php


示例17: carrega

 public function carrega()
 {
     $this->conectar();
     $queries[] = "SELECT * FROM status;";
     $resultado = $this->query($queries);
     $this->desconectar();
     foreach ($resultado as $result) {
         $status = new Status();
         $status->setId($result["id"]);
         $status->setNome($result["status"]);
         $status->setCor($result["cor"]);
         $this->addStatus($status);
     }
 }
开发者ID:rafaelslo,项目名称:maxima80,代码行数:14,代码来源:statusModel.php


示例18: 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


示例19: getStatusError

 /**
  * Get error message key and parameters from status
  *
  * @param \Status $status
  * @return array of error message key, and message parameters as an array
  * @throws Exception if called on an "OK" Status
  */
 public function getStatusError(\Status $status)
 {
     if ($status->isOK()) {
         throw new \Exception('Status contains no errors');
     }
     $errors = $status->getErrorsByType('error');
     if (!empty($errors[0]['message'])) {
         $message = $errors[0]['message'];
         $params = $errors[0]['params'];
     } else {
         $message = 'fbconnect-error';
         $params = [];
     }
     return [$message, $params];
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:22,代码来源:FacebookClientFactory.php


示例20: onMovePageCheckPermissions

 /**
  * MovePageCheckPermissions hook (1.25+)
  *
  * @param Title $oldTitle
  * @param Title $newTitle
  * @param User $user
  * @param $reason
  * @param Status $status
  * @return bool
  */
 public static function onMovePageCheckPermissions(Title $oldTitle, Title $newTitle, User $user, $reason, Status $status)
 {
     $titleBlacklist = TitleBlacklist::singleton();
     $blacklisted = $titleBlacklist->userCannot($newTitle, $user, 'move');
     if (!$blacklisted) {
         $blacklisted = $titleBlacklist->userCannot($oldTitle, $user, 'edit');
     }
     if ($blacklisted instanceof TitleBlacklistEntry) {
         $errmsg = $blacklisted->getErrorMessage('move');
         ApiBase::$messageMap[$errmsg] = array('code' => $errmsg, 'info' => 'TitleBlacklist prevents this new title from being created or old title from being edited');
         $status->fatal($errmsg, $blacklisted->getRaw(), $oldTitle->getFullText(), $newTitle->getFullText());
         return false;
     }
     return true;
 }
开发者ID:eliagbayani,项目名称:LiteratureEditor,代码行数:25,代码来源:TitleBlacklist.hooks.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP StatusNet类代码示例发布时间:2022-05-23
下一篇:
PHP Stats类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap