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


PHP PhabricatorLiskDAO类代码示例

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


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

示例1: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorEditEngineConfigurationTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
         case PhabricatorEditEngineConfigurationTransaction::TYPE_PREAMBLE:
             $object->setPreamble($xaction->getNewValue());
             return;
         case PhabricatorEditEngineConfigurationTransaction::TYPE_ORDER:
             $object->setFieldOrder($xaction->getNewValue());
             return;
         case PhabricatorEditEngineConfigurationTransaction::TYPE_DEFAULT:
             $field_key = $xaction->getMetadataValue('field.key');
             $object->setFieldDefault($field_key, $xaction->getNewValue());
             return;
         case PhabricatorEditEngineConfigurationTransaction::TYPE_LOCKS:
             $object->setFieldLocks($xaction->getNewValue());
             return;
         case PhabricatorEditEngineConfigurationTransaction::TYPE_DEFAULTCREATE:
             $object->setIsDefault($xaction->getNewValue());
             return;
         case PhabricatorEditEngineConfigurationTransaction::TYPE_DISABLE:
             $object->setIsDisabled($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
开发者ID:patelhardik,项目名称:phabricator,代码行数:28,代码来源:PhabricatorEditEngineConfigurationEditor.php

示例2: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case HeraldRuleTransaction::TYPE_DISABLE:
             return $object->setIsDisabled($xaction->getNewValue());
     }
 }
开发者ID:pugong,项目名称:phabricator,代码行数:7,代码来源:HeraldRuleEditor.php

示例3: applyCustomExternalTransaction

 protected function applyCustomExternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case AlmanacDeviceTransaction::TYPE_NAME:
             return;
         case AlmanacDeviceTransaction::TYPE_INTERFACE:
             $old = $xaction->getOldValue();
             if ($old) {
                 $interface = id(new AlmanacInterfaceQuery())->setViewer($this->requireActor())->withIDs(array($old['id']))->executeOne();
                 if (!$interface) {
                     throw new Exception(pht('Unable to load interface!'));
                 }
             } else {
                 $interface = AlmanacInterface::initializeNewInterface()->setDevicePHID($object->getPHID());
             }
             $new = $xaction->getNewValue();
             if ($new) {
                 $interface->setNetworkPHID($new['networkPHID'])->setAddress($new['address'])->setPort((int) $new['port']);
                 if (idx($new, 'phid')) {
                     $interface->setPHID($new['phid']);
                 }
                 $interface->save();
             } else {
                 $interface->delete();
             }
             return;
     }
     return parent::applyCustomExternalTransaction($object, $xaction);
 }
开发者ID:pugong,项目名称:phabricator,代码行数:29,代码来源:AlmanacDeviceEditor.php

示例4: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case NuanceQueueTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             break;
     }
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:8,代码来源:NuanceQueueEditor.php

示例5: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case FundBackerTransaction::TYPE_STATUS:
             $object->setStatus($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
开发者ID:denghp,项目名称:phabricator,代码行数:9,代码来源:FundBackerEditor.php

示例6: applyCustomInternalTransaction

 public function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     $new = $xaction->getNewValue();
     switch ($xaction->getTransactionType()) {
         case ReleephProductTransaction::TYPE_ACTIVE:
             $object->setIsActive($new);
             break;
     }
 }
开发者ID:denghp,项目名称:phabricator,代码行数:9,代码来源:ReleephProductEditor.php

示例7: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case AlmanacNetworkTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
开发者ID:pugong,项目名称:phabricator,代码行数:9,代码来源:AlmanacNetworkEditor.php

示例8: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case NuanceRequestorTransaction::TYPE_PROPERTY:
             $key = $xaction->getMetadataValue(NuanceRequestorTransaction::PROPERTY_KEY);
             $object->setNuanceProperty($key, $xaction->getNewValue());
             break;
     }
 }
开发者ID:pugong,项目名称:phabricator,代码行数:9,代码来源:NuanceRequestorEditor.php

示例9: computeRawFactsForObject

 public function computeRawFactsForObject(PhabricatorLiskDAO $object)
 {
     $facts = array();
     $phid = $object->getPHID();
     $type = phid_get_type($phid);
     foreach (array('N:*', 'N:' . $type) as $fact_type) {
         $facts[] = id(new PhabricatorFactRaw())->setFactType($fact_type)->setObjectPHID($phid)->setValueX(1)->setEpoch($object->getDateCreated());
     }
     return $facts;
 }
开发者ID:pugong,项目名称:phabricator,代码行数:10,代码来源:PhabricatorFactCountEngine.php

示例10: applyCustomExternalTransaction

 protected function applyCustomExternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case HeraldRuleTransaction::TYPE_EDIT:
             $object->saveConditions($object->getConditions());
             $object->saveActions($object->getActions());
             break;
     }
     return;
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:10,代码来源:HeraldRuleEditor.php

示例11: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case NuanceSourceTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             break;
         case NuanceSourceTransaction::TYPE_DEFAULT_QUEUE:
             $object->setDefaultQueuePHID($xaction->getNewValue());
             break;
     }
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:11,代码来源:NuanceSourceEditor.php

示例12: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhortuneAccountTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
         case PhabricatorTransactions::TYPE_EDGE:
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
开发者ID:denghp,项目名称:phabricator,代码行数:11,代码来源:PhortuneAccountEditor.php

示例13: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case AlmanacBindingTransaction::TYPE_INTERFACE:
             $interface = id(new AlmanacInterfaceQuery())->setViewer($this->requireActor())->withPHIDs(array($xaction->getNewValue()))->executeOne();
             $object->setDevicePHID($interface->getDevicePHID());
             $object->setInterfacePHID($interface->getPHID());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
开发者ID:pugong,项目名称:phabricator,代码行数:11,代码来源:AlmanacBindingEditor.php

示例14: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhluxTransaction::TYPE_EDIT_KEY:
             $object->setVariableKey($xaction->getNewValue());
             return;
         case PhluxTransaction::TYPE_EDIT_VALUE:
             $object->setVariableValue($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
开发者ID:truSense,项目名称:phabricator,代码行数:12,代码来源:PhluxVariableEditor.php

示例15: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhortuneMerchantTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
         case PhortuneMerchantTransaction::TYPE_DESCRIPTION:
             $object->setDescription($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
开发者ID:truSense,项目名称:phabricator,代码行数:12,代码来源:PhortuneMerchantEditor.php


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