當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PhabricatorCursorPagedPolicyAwareQuery類代碼示例

本文整理匯總了PHP中PhabricatorCursorPagedPolicyAwareQuery的典型用法代碼示例。如果您正苦於以下問題:PHP PhabricatorCursorPagedPolicyAwareQuery類的具體用法?PHP PhabricatorCursorPagedPolicyAwareQuery怎麽用?PHP PhabricatorCursorPagedPolicyAwareQuery使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了PhabricatorCursorPagedPolicyAwareQuery類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: applyApplicationSearchConstraintToQuery

 public function applyApplicationSearchConstraintToQuery(PhabricatorApplicationSearchEngine $engine, PhabricatorCursorPagedPolicyAwareQuery $query, $value)
 {
     if (is_string($value) && !strlen($value)) {
         return;
     }
     $value = (array) $value;
     if ($value) {
         $query->withApplicationSearchContainsConstraint($this->newStringIndex(null), $value);
     }
 }
開發者ID:endlessm,項目名稱:phabricator,代碼行數:10,代碼來源:PhabricatorStandardCustomFieldLink.php

示例2: buildWhereClauseParts

 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn)
 {
     $where = parent::buildWhereClauseParts($conn);
     if ($this->ids !== null) {
         $where[] = qsprintf($conn, 'id IN (%Ld)', $this->ids);
     }
     if ($this->phids !== null) {
         $where[] = qsprintf($conn, 'phid IN (%Ls)', $this->phids);
     }
     if ($this->objectPHIDs !== null) {
         $where[] = qsprintf($conn, 'objectPHID IN (%Ls)', $this->objectPHIDs);
     }
     if ($this->keys !== null) {
         $sql = array();
         foreach ($this->keys as $key) {
             $sql[] = qsprintf($conn, '(keyType = %s AND keyIndex = %s)', $key->getType(), $key->getHash());
         }
         $where[] = implode(' OR ', $sql);
     }
     if ($this->isActive !== null) {
         if ($this->isActive) {
             $where[] = qsprintf($conn, 'isActive = %d', 1);
         } else {
             $where[] = qsprintf($conn, 'isActive IS NULL');
         }
     }
     return $where;
 }
開發者ID:rchicoli,項目名稱:phabricator,代碼行數:28,代碼來源:PhabricatorAuthSSHKeyQuery.php

示例3: buildWhereClauseParts

 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn)
 {
     $where = parent::buildWhereClauseParts($conn);
     if ($this->ids !== null) {
         $where[] = qsprintf($conn, 'id IN (%Ld)', $this->ids);
     }
     if ($this->tokenResources !== null) {
         $where[] = qsprintf($conn, 'tokenResource IN (%Ls)', $this->tokenResources);
     }
     if ($this->tokenTypes !== null) {
         $where[] = qsprintf($conn, 'tokenType IN (%Ls)', $this->tokenTypes);
     }
     if ($this->expired !== null) {
         if ($this->expired) {
             $where[] = qsprintf($conn, 'tokenExpires <= %d', time());
         } else {
             $where[] = qsprintf($conn, 'tokenExpires > %d', time());
         }
     }
     if ($this->tokenCodes !== null) {
         $where[] = qsprintf($conn, 'tokenCode IN (%Ls)', $this->tokenCodes);
     }
     if ($this->userPHIDs !== null) {
         $where[] = qsprintf($conn, 'userPHID IN (%Ls)', $this->userPHIDs);
     }
     return $where;
 }
開發者ID:rchicoli,項目名稱:phabricator,代碼行數:27,代碼來源:PhabricatorAuthTemporaryTokenQuery.php

示例4: buildWhereClauseParts

 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn)
 {
     $where = parent::buildWhereClauseParts($conn);
     if ($this->ids) {
         $where[] = qsprintf($conn, 'p.id IN (%Ld)', $this->ids);
     }
     if ($this->phids) {
         $where[] = qsprintf($conn, 'p.phid IN (%Ls)', $this->phids);
     }
     if ($this->bloggerPHIDs) {
         $where[] = qsprintf($conn, 'p.bloggerPHID IN (%Ls)', $this->bloggerPHIDs);
     }
     if ($this->phameTitles) {
         $where[] = qsprintf($conn, 'p.phameTitle IN (%Ls)', $this->phameTitles);
     }
     if ($this->visibility !== null) {
         $where[] = qsprintf($conn, 'p.visibility = %d', $this->visibility);
     }
     if ($this->publishedAfter !== null) {
         $where[] = qsprintf($conn, 'p.datePublished > %d', $this->publishedAfter);
     }
     if ($this->blogPHIDs) {
         $where[] = qsprintf($conn, 'p.blogPHID in (%Ls)', $this->blogPHIDs);
     }
     return $where;
 }
開發者ID:Apelsin,項目名稱:phabricator,代碼行數:26,代碼來源:PhamePostQuery.php

示例5: buildWhereClauseParts

 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn)
 {
     $where = parent::buildWhereClauseParts($conn);
     if ($this->callerPHIDs !== null) {
         $where[] = qsprintf($conn, 'callerPHID IN (%Ls)', $this->callerPHIDs);
     }
     if ($this->methods !== null) {
         $where[] = qsprintf($conn, 'method IN (%Ls)', $this->methods);
     }
     if ($this->methodStatuses !== null) {
         $statuses = array_fuse($this->methodStatuses);
         $methods = id(new PhabricatorConduitMethodQuery())->setViewer($this->getViewer())->execute();
         $method_names = array();
         foreach ($methods as $method) {
             $status = $method->getMethodStatus();
             if (isset($statuses[$status])) {
                 $method_names[] = $method->getAPIMethodName();
             }
         }
         if (!$method_names) {
             throw new PhabricatorEmptyQueryException();
         }
         $where[] = qsprintf($conn, 'method IN (%Ls)', $method_names);
     }
     return $where;
 }
開發者ID:pugong,項目名稱:phabricator,代碼行數:26,代碼來源:PhabricatorConduitLogQuery.php

示例6: buildWhereClauseParts

 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn)
 {
     $where = parent::buildWhereClauseParts($conn);
     if ($this->ids !== null) {
         $where[] = qsprintf($conn, 'mail.id IN (%Ld)', $this->ids);
     }
     if ($this->phids !== null) {
         $where[] = qsprintf($conn, 'mail.phid IN (%Ls)', $this->phids);
     }
     if ($this->actorPHIDs !== null) {
         $where[] = qsprintf($conn, 'mail.actorPHID IN (%Ls)', $this->actorPHIDs);
     }
     if ($this->recipientPHIDs !== null) {
         $where[] = qsprintf($conn, 'recipient.dst IN (%Ls)', $this->recipientPHIDs);
     }
     if ($this->actorPHIDs === null && $this->recipientPHIDs === null) {
         $viewer = $this->getViewer();
         if (!$viewer->isOmnipotent()) {
             $where[] = qsprintf($conn, 'edge.dst = %s OR actorPHID = %s', $viewer->getPHID(), $viewer->getPHID());
         }
     }
     if ($this->createdMin !== null) {
         $where[] = qsprintf($conn, 'mail.dateCreated >= %d', $this->createdMin);
     }
     if ($this->createdMax !== null) {
         $where[] = qsprintf($conn, 'mail.dateCreated <= %d', $this->createdMax);
     }
     return $where;
 }
開發者ID:pugong,項目名稱:phabricator,代碼行數:29,代碼來源:PhabricatorMetaMTAMailQuery.php

示例7: buildWhereClauseParts

 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn)
 {
     $where = parent::buildWhereClauseParts($conn);
     if ($this->ids !== null) {
         $where[] = qsprintf($conn, 'q.id IN (%Ld)', $this->ids);
     }
     if ($this->phids !== null) {
         $where[] = qsprintf($conn, 'q.phid IN (%Ls)', $this->phids);
     }
     if ($this->authorPHIDs !== null) {
         $where[] = qsprintf($conn, 'q.authorPHID IN (%Ls)', $this->authorPHIDs);
     }
     if ($this->status !== null) {
         switch ($this->status) {
             case self::STATUS_ANY:
                 break;
             case self::STATUS_OPEN:
                 $where[] = qsprintf($conn, 'q.status = %d', PonderQuestionStatus::STATUS_OPEN);
                 break;
             case self::STATUS_CLOSED:
                 $where[] = qsprintf($conn, 'q.status = %d', PonderQuestionStatus::STATUS_CLOSED);
                 break;
             default:
                 throw new Exception(pht("Unknown status query '%s'!", $this->status));
         }
     }
     return $where;
 }
開發者ID:shrimpma,項目名稱:phabricator,代碼行數:28,代碼來源:PonderQuestionQuery.php

示例8: buildWhereClauseParts

 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn)
 {
     $where = parent::buildWhereClauseParts($conn);
     if ($this->ids !== null) {
         $where[] = qsprintf($conn, 'id IN (%Ld)', $this->ids);
     }
     if ($this->phids !== null) {
         $where[] = qsprintf($conn, 'phid IN (%Ls)', $this->phids);
     }
     if ($this->repositoryPHIDs !== null) {
         $where[] = qsprintf($conn, 'repositoryPHID IN (%Ls)', $this->repositoryPHIDs);
     }
     if ($this->refTypes !== null) {
         $where[] = qsprintf($conn, 'refType IN (%Ls)', $this->refTypes);
     }
     if ($this->refNames !== null) {
         $name_hashes = array();
         foreach ($this->refNames as $name) {
             $name_hashes[] = PhabricatorHash::digestForIndex($name);
         }
         $where[] = qsprintf($conn, 'refNameHash IN (%Ls)', $name_hashes);
     }
     if (strlen($this->datasourceQuery)) {
         $where[] = qsprintf($conn, 'refNameRaw LIKE %>', $this->datasourceQuery);
     }
     return $where;
 }
開發者ID:pugong,項目名稱:phabricator,代碼行數:27,代碼來源:PhabricatorRepositoryRefCursorQuery.php

示例9: buildWhereClauseParts

 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn)
 {
     $where = parent::buildWhereClauseParts($conn);
     if ($this->ids !== null) {
         $where[] = qsprintf($conn, 'id IN (%Ld)', $this->ids);
     }
     if ($this->phids !== null) {
         $where[] = qsprintf($conn, 'phid IN (%Ls)', $this->phids);
     }
     return $where;
 }
開發者ID:aya,項目名稱:phabricator,代碼行數:11,代碼來源:PhabricatorDashboardQuery.php

示例10: buildWhereClauseParts

 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn)
 {
     $where = parent::buildWhereClauseParts($conn);
     if ($this->badgePHIDs !== null) {
         $where[] = qsprintf($conn, 'badgePHID IN (%Ls)', $this->badgePHIDs);
     }
     if ($this->recipientPHIDs !== null) {
         $where[] = qsprintf($conn, 'recipientPHID IN (%Ls)', $this->recipientPHIDs);
     }
     if ($this->awarderPHIDs !== null) {
         $where[] = qsprintf($conn, 'awarderPHID IN (%Ls)', $this->awarderPHIDs);
     }
     return $where;
 }
開發者ID:rchicoli,項目名稱:phabricator,代碼行數:14,代碼來源:PhabricatorBadgesAwardQuery.php

示例11: buildWhereClauseParts

 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn)
 {
     $where = parent::buildWhereClauseParts($conn);
     if ($this->ids !== null) {
         $where[] = qsprintf($conn, 'id IN (%Ld)', $this->ids);
     }
     if ($this->repositoryPHIDs !== null) {
         $where[] = qsprintf($conn, 'repositoryPHID IN (%Ls)', $this->repositoryPHIDs);
     }
     if ($this->oldCommitIdentifiers !== null) {
         $where[] = qsprintf($conn, 'oldCommitIdentifier IN (%Ls)', $this->oldCommitIdentifiers);
     }
     return $where;
 }
開發者ID:endlessm,項目名稱:phabricator,代碼行數:14,代碼來源:DiffusionCommitHintQuery.php

示例12: buildWhereClauseParts

 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn)
 {
     $where = parent::buildWhereClauseParts($conn);
     if ($this->authorPHIDs !== null) {
         $where[] = qsprintf($conn, 'authorPHID IN (%Ls)', $this->authorPHIDs);
     }
     if ($this->objectPHIDs !== null) {
         $where[] = qsprintf($conn, 'objectPHID IN (%Ls)', $this->objectPHIDs);
     }
     if ($this->tokenPHIDs !== null) {
         $where[] = qsprintf($conn, 'tokenPHID IN (%Ls)', $this->tokenPHIDs);
     }
     return $where;
 }
開發者ID:truSense,項目名稱:phabricator,代碼行數:14,代碼來源:PhabricatorTokenGivenQuery.php

示例13: buildWhereClauseParts

 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn)
 {
     $where = parent::buildWhereClauseParts($conn);
     if ($this->ids !== null) {
         $where[] = qsprintf($conn, 'id IN (%Ld)', $this->ids);
     }
     if ($this->phids !== null) {
         $where[] = qsprintf($conn, 'phid IN (%Ls)', $this->phids);
     }
     if ($this->archived !== null) {
         $where[] = qsprintf($conn, 'isArchived = %d', (int) $this->archived);
     }
     if ($this->panelTypes !== null) {
         $where[] = qsprintf($conn, 'panelType IN (%Ls)', $this->panelTypes);
     }
     return $where;
 }
開發者ID:barcelonascience,項目名稱:phabricator,代碼行數:17,代碼來源:PhabricatorDashboardPanelQuery.php

示例14: buildWhereClauseParts

 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn)
 {
     $where = parent::buildWhereClauseParts($conn);
     if ($this->ids !== null) {
         $where[] = qsprintf($conn, 'id IN (%Ld)', $this->ids);
     }
     if ($this->phids !== null) {
         $where[] = qsprintf($conn, 'phid IN (%Ls)', $this->phids);
     }
     if ($this->authorPHIDs !== null) {
         $where[] = qsprintf($conn, 'authorPHID in (%Ls)', $this->authorPHIDs);
     }
     if ($this->upcoming !== null) {
         $where[] = qsprintf($conn, 'epoch >= %d', PhabricatorTime::getNow());
     }
     return $where;
 }
開發者ID:pugong,項目名稱:phabricator,代碼行數:17,代碼來源:PhabricatorCountdownQuery.php

示例15: buildWhereClauseParts

 protected function buildWhereClauseParts(AphrontDatabaseConnection $conn)
 {
     $where = parent::buildWhereClauseParts($conn);
     if ($this->ids !== null) {
         $where[] = qsprintf($conn, 'id IN (%Ld)', $this->ids);
     }
     if ($this->buildTargetPHIDs !== null) {
         $where[] = qsprintf($conn, 'buildTargetPHID IN (%Ls)', $this->buildTargetPHIDs);
     }
     if ($this->artifactTypes !== null) {
         $where[] = qsprintf($conn, 'artifactType in (%Ls)', $this->artifactTypes);
     }
     if ($this->artifactIndexes !== null) {
         $where[] = qsprintf($conn, 'artifactIndex IN (%Ls)', $this->artifactIndexes);
     }
     return $where;
 }
開發者ID:pugong,項目名稱:phabricator,代碼行數:17,代碼來源:HarbormasterBuildArtifactQuery.php


注:本文中的PhabricatorCursorPagedPolicyAwareQuery類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。