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


PHP PhabricatorApplicationTransaction::getRequiredHandlePHIDs方法代码示例

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


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

示例1: getRequiredHandlePHIDs

 public function getRequiredHandlePHIDs()
 {
     $phids = parent::getRequiredHandlePHIDs();
     $type = $this->getTransactionType();
     switch ($type) {
         case self::TYPE_COMMIT:
             $phids[] = $this->getObjectPHID();
             $data = $this->getNewValue();
             if ($data['authorPHID']) {
                 $phids[] = $data['authorPHID'];
             }
             if ($data['committerPHID']) {
                 $phids[] = $data['committerPHID'];
             }
             break;
         case PhabricatorAuditActionConstants::ADD_CCS:
         case PhabricatorAuditActionConstants::ADD_AUDITORS:
             $old = $this->getOldValue();
             $new = $this->getNewValue();
             if (!is_array($old)) {
                 $old = array();
             }
             if (!is_array($new)) {
                 $new = array();
             }
             foreach (array_keys($old + $new) as $phid) {
                 $phids[] = $phid;
             }
             break;
     }
     return $phids;
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:32,代码来源:PhabricatorAuditTransaction.php

示例2: getRequiredHandlePHIDs

 public function getRequiredHandlePHIDs()
 {
     $phids = parent::getRequiredHandlePHIDs();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_PUSH_POLICY:
         case self::TYPE_SERVICE:
             if ($old) {
                 $phids[] = $old;
             }
             if ($new) {
                 $phids[] = $new;
             }
             break;
         case self::TYPE_SYMBOLS_SOURCES:
         case self::TYPE_AUTOMATION_BLUEPRINTS:
             if ($old) {
                 $phids = array_merge($phids, $old);
             }
             if ($new) {
                 $phids = array_merge($phids, $new);
             }
             break;
     }
     return $phids;
 }
开发者ID:truSense,项目名称:phabricator,代码行数:27,代码来源:PhabricatorRepositoryTransaction.php

示例3: getRequiredHandlePHIDs

 public function getRequiredHandlePHIDs()
 {
     $phids = parent::getRequiredHandlePHIDs();
     switch ($this->getTransactionType()) {
         case self::TYPE_NAME:
         case self::TYPE_START_DATE:
         case self::TYPE_END_DATE:
         case self::TYPE_DESCRIPTION:
         case self::TYPE_CANCEL:
         case self::TYPE_ALL_DAY:
         case self::TYPE_RECURRING:
         case self::TYPE_FREQUENCY:
         case self::TYPE_RECURRENCE_END_DATE:
         case self::TYPE_INSTANCE_OF_EVENT:
         case self::TYPE_SEQUENCE_INDEX:
             $phids[] = $this->getObjectPHID();
             break;
         case self::TYPE_INVITE:
             $new = $this->getNewValue();
             foreach ($new as $phid => $status) {
                 $phids[] = $phid;
             }
             break;
     }
     return $phids;
 }
开发者ID:pugong,项目名称:phabricator,代码行数:26,代码来源:PhabricatorCalendarEventTransaction.php

示例4: getRequiredHandlePHIDs

 public function getRequiredHandlePHIDs()
 {
     $phids = parent::getRequiredHandlePHIDs();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_PRIMARY:
             if ($old) {
                 $phids[] = $old;
             }
             if ($new) {
                 $phids[] = $new;
             }
             break;
         case self::TYPE_OWNERS:
             $add = array_diff($new, $old);
             foreach ($add as $phid) {
                 $phids[] = $phid;
             }
             $rem = array_diff($old, $new);
             foreach ($rem as $phid) {
                 $phids[] = $phid;
             }
             break;
     }
     return $phids;
 }
开发者ID:JohnnyEstilles,项目名称:phabricator,代码行数:27,代码来源:PhabricatorOwnersPackageTransaction.php

示例5: getRequiredHandlePHIDs

 public function getRequiredHandlePHIDs()
 {
     $phids = parent::getRequiredHandlePHIDs();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_ACTION:
             if ($new == DifferentialAction::ACTION_CLOSE && $this->getMetadataValue('isCommitClose')) {
                 $phids[] = $this->getMetadataValue('commitPHID');
                 if ($this->getMetadataValue('committerPHID')) {
                     $phids[] = $this->getMetadataValue('committerPHID');
                 }
                 if ($this->getMetadataValue('authorPHID')) {
                     $phids[] = $this->getMetadataValue('authorPHID');
                 }
             }
             break;
         case self::TYPE_UPDATE:
             if ($new) {
                 $phids[] = $new;
             }
             break;
     }
     return $phids;
 }
开发者ID:pugong,项目名称:phabricator,代码行数:25,代码来源:DifferentialTransaction.php

示例6: getRequiredHandlePHIDs

 public function getRequiredHandlePHIDs()
 {
     $phids = parent::getRequiredHandlePHIDs();
     switch ($this->getTransactionType()) {
         case self::TYPE_CONTENT:
             $phids[] = $this->getObjectPHID();
             break;
     }
     return $phids;
 }
开发者ID:denghp,项目名称:phabricator,代码行数:10,代码来源:PonderAnswerTransaction.php

示例7: getRequiredHandlePHIDs

 public function getRequiredHandlePHIDs()
 {
     $phids = parent::getRequiredHandlePHIDs();
     switch ($this->getTransactionType()) {
         case self::TYPE_NAME:
         case self::TYPE_URL:
         case self::TYPE_DESCRIPTION:
             $phids[] = $this->getObjectPHID();
             break;
     }
     return $phids;
 }
开发者ID:fengshao0907,项目名称:phabricator,代码行数:12,代码来源:PhabricatorPhurlURLTransaction.php

示例8: getRequiredHandlePHIDs

 public function getRequiredHandlePHIDs()
 {
     $phids = parent::getRequiredHandlePHIDs();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_PUSH_POLICY:
             $phids[] = $old;
             $phids[] = $new;
             break;
     }
     return $phids;
 }
开发者ID:denghp,项目名称:phabricator,代码行数:13,代码来源:PhabricatorRepositoryTransaction.php

示例9: getRequiredHandlePHIDs

 public function getRequiredHandlePHIDs()
 {
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     $req_phids = array();
     switch ($this->getTransactionType()) {
         case self::TYPE_PROFILEIMAGE:
         case self::TYPE_HEADERIMAGE:
             $req_phids[] = $old;
             $req_phids[] = $new;
             break;
     }
     return array_merge($req_phids, parent::getRequiredHandlePHIDs());
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:14,代码来源:PhameBlogTransaction.php

示例10: getRequiredHandlePHIDs

 public function getRequiredHandlePHIDs()
 {
     $phids = parent::getRequiredHandlePHIDs();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case PhabricatorMacroTransactionType::TYPE_FILE:
         case PhabricatorMacroTransactionType::TYPE_AUDIO:
             if ($old !== null) {
                 $phids[] = $old;
             }
             $phids[] = $new;
             break;
     }
     return $phids;
 }
开发者ID:denghp,项目名称:phabricator,代码行数:16,代码来源:PhabricatorMacroTransaction.php

示例11: getRequiredHandlePHIDs

 public function getRequiredHandlePHIDs()
 {
     $phids = parent::getRequiredHandlePHIDs();
     $phids[] = $this->getObjectPHID();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_REQUEST:
         case self::TYPE_DISCOVERY:
             $phids[] = $new;
             break;
         case self::TYPE_EDIT_FIELD:
             self::searchForPHIDs($this->getOldValue(), $phids);
             self::searchForPHIDs($this->getNewValue(), $phids);
             break;
     }
     return $phids;
 }
开发者ID:pugong,项目名称:phabricator,代码行数:17,代码来源:ReleephRequestTransaction.php

示例12: getRequiredHandlePHIDs

 public function getRequiredHandlePHIDs()
 {
     $phids = parent::getRequiredHandlePHIDs();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_MOVE_TO:
         case self::TYPE_MOVE_AWAY:
             $phids[] = $new['phid'];
             break;
         case self::TYPE_TITLE:
             if ($this->getMetadataValue('stub:create:phid')) {
                 $phids[] = $this->getMetadataValue('stub:create:phid');
             }
             break;
     }
     return $phids;
 }
开发者ID:pugong,项目名称:phabricator,代码行数:17,代码来源:PhrictionTransaction.php

示例13: getRequiredHandlePHIDs

 public function getRequiredHandlePHIDs()
 {
     $phids = parent::getRequiredHandlePHIDs();
     switch ($this->getTransactionType()) {
         case self::TYPE_BLOG:
             $old = $this->getOldValue();
             $new = $this->getNewValue();
             if ($old) {
                 $phids[] = $old;
             }
             if ($new) {
                 $phids[] = $new;
             }
             break;
     }
     return $phids;
 }
开发者ID:NeoArmageddon,项目名称:phabricator,代码行数:17,代码来源:PhamePostTransaction.php

示例14: getRequiredHandlePHIDs

 public function getRequiredHandlePHIDs()
 {
     $phids = parent::getRequiredHandlePHIDs();
     $new = $this->getNewValue();
     $old = $this->getOldValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_OWNER:
             if ($new) {
                 $phids[] = $new;
             }
             if ($old) {
                 $phids[] = $old;
             }
             break;
         case self::TYPE_PROJECT_COLUMN:
             $phids[] = $new['projectPHID'];
             $phids[] = head($new['columnPHIDs']);
             break;
         case self::TYPE_MERGED_INTO:
             $phids[] = $new;
             break;
         case self::TYPE_MERGED_FROM:
             $phids = array_merge($phids, $new);
             break;
         case self::TYPE_EDGE:
             $phids = array_mergev(array($phids, array_keys(nonempty($old, array())), array_keys(nonempty($new, array()))));
             break;
         case self::TYPE_ATTACH:
             $old = nonempty($old, array());
             $new = nonempty($new, array());
             $phids = array_mergev(array($phids, array_keys(idx($new, 'FILE', array())), array_keys(idx($old, 'FILE', array()))));
             break;
         case self::TYPE_UNBLOCK:
             foreach (array_keys($new) as $phid) {
                 $phids[] = $phid;
             }
             break;
         case self::TYPE_STATUS:
             $commit_phid = $this->getMetadataValue('commitPHID');
             if ($commit_phid) {
                 $phids[] = $commit_phid;
             }
             break;
     }
     return $phids;
 }
开发者ID:paladox,项目名称:phabricator,代码行数:46,代码来源:ManiphestTransaction.php

示例15: getRequiredHandlePHIDs

 public function getRequiredHandlePHIDs()
 {
     $phids = parent::getRequiredHandlePHIDs();
     $old = $this->getOldValue();
     $new = $this->getNewValue();
     switch ($this->getTransactionType()) {
         case self::TYPE_INTERFACE:
             if ($old) {
                 $phids[] = $old['networkPHID'];
             }
             if ($new) {
                 $phids[] = $new['networkPHID'];
             }
             break;
     }
     return $phids;
 }
开发者ID:pugong,项目名称:phabricator,代码行数:17,代码来源:AlmanacDeviceTransaction.php


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