當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。