当前位置: 首页>>代码示例>>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;未经允许,请勿转载。