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


PHP DifferentialRevision::loadAllFromArray方法代码示例

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


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

示例1: loadRevisions

 private function loadRevisions($phid)
 {
     $table = new DifferentialRevision();
     $conn_r = $table->establishConnection('r');
     $rows = queryfx_all($conn_r, 'SELECT revisions.* FROM %T revisions ' . 'JOIN %T comments ON comments.revisionID = revisions.id ' . 'JOIN (' . ' SELECT revisionID FROM %T WHERE objectPHID = %s ' . ' UNION ALL ' . ' SELECT id from differential_revision WHERE authorPHID = %s) rel ' . 'ON (comments.revisionID = rel.revisionID)' . 'WHERE comments.action = %s' . 'AND comments.authorPHID = %s', $table->getTableName(), id(new DifferentialComment())->getTableName(), DifferentialRevision::RELATIONSHIP_TABLE, $phid, $phid, $this->filter, $phid);
     return $table->loadAllFromArray($rows);
 }
开发者ID:rudimk,项目名称:phabricator,代码行数:7,代码来源:DifferentialRevisionStatsController.php

示例2: execute

 /**
  * Execute the query as configured, returning matching
  * @{class:DifferentialRevision} objects.
  *
  * @return list List of matching DifferentialRevision objects.
  * @task exec
  */
 public function execute()
 {
     $table = new DifferentialRevision();
     $conn_r = $table->establishConnection('r');
     if ($this->shouldUseResponsibleFastPath()) {
         $data = $this->loadDataUsingResponsibleFastPath();
     } else {
         $data = $this->loadData();
     }
     $revisions = $table->loadAllFromArray($data);
     if ($revisions) {
         if ($this->needRelationships) {
             $this->loadRelationships($conn_r, $revisions);
         }
         if ($this->needCommitPHIDs) {
             $this->loadCommitPHIDs($conn_r, $revisions);
         }
         $need_active = $this->needActiveDiffs;
         $need_ids = $need_active || $this->needDiffIDs;
         if ($need_ids) {
             $this->loadDiffIDs($conn_r, $revisions);
         }
         if ($need_active) {
             $this->loadActiveDiffs($conn_r, $revisions);
         }
         if ($this->needHashes) {
             $this->loadHashes($conn_r, $revisions);
         }
     }
     return $revisions;
 }
开发者ID:rudimk,项目名称:phabricator,代码行数:38,代码来源:DifferentialRevisionQuery.php

示例3: loadPage

 /**
  * Execute the query as configured, returning matching
  * @{class:DifferentialRevision} objects.
  *
  * @return list List of matching DifferentialRevision objects.
  * @task exec
  */
 public function loadPage()
 {
     $table = new DifferentialRevision();
     $conn_r = $table->establishConnection('r');
     $data = $this->loadData();
     return $table->loadAllFromArray($data);
 }
开发者ID:denghp,项目名称:phabricator,代码行数:14,代码来源:DifferentialRevisionQuery.php

示例4: loadAllOpenWithCCs

 private function loadAllOpenWithCCs(array $ccphids)
 {
     $rev = new DifferentialRevision();
     $revision = new DifferentialRevision();
     $data = queryfx_all($rev->establishConnection('r'), 'SELECT revision.* FROM %T revision
     JOIN %T relationship ON relationship.revisionID = revision.id
       AND relationship.relation = %s
       AND relationship.objectPHID in (%Ls)
     WHERE revision.status in (%Ld) %Q', $revision->getTableName(), DifferentialRevision::RELATIONSHIP_TABLE, DifferentialRevision::RELATION_SUBSCRIBED, $ccphids, $this->getOpenStatuses(), $this->getOrderClause());
     return $revision->loadAllFromArray($data);
 }
开发者ID:nexeck,项目名称:phabricator,代码行数:11,代码来源:DifferentialRevisionListData.php


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