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


PHP PhabricatorLiskDAO::setIsDisabled方法代码示例

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


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

示例1: 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

示例2: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case DrydockBlueprintTransaction::TYPE_NAME:
             $object->setBlueprintName($xaction->getNewValue());
             return;
         case DrydockBlueprintTransaction::TYPE_DISABLED:
             $object->setIsDisabled((int) $xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
开发者ID:pugong,项目名称:phabricator,代码行数:12,代码来源:DrydockBlueprintEditor.php

示例3: 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;
         case AlmanacBindingTransaction::TYPE_DISABLE:
             $object->setIsDisabled($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:14,代码来源:AlmanacBindingEditor.php

示例4: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorOAuthServerTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             return;
         case PhabricatorOAuthServerTransaction::TYPE_REDIRECT_URI:
             $object->setRedirectURI($xaction->getNewValue());
             return;
         case PhabricatorOAuthServerTransaction::TYPE_DISABLED:
             $object->setIsDisabled($xaction->getNewValue());
             return;
     }
     return parent::applyCustomInternalTransaction($object, $xaction);
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:15,代码来源:PhabricatorOAuthServerEditor.php

示例5: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case HeraldRuleTransaction::TYPE_DISABLE:
             return $object->setIsDisabled($xaction->getNewValue());
         case HeraldRuleTransaction::TYPE_NAME:
             return $object->setName($xaction->getNewValue());
         case HeraldRuleTransaction::TYPE_EDIT:
             $new_state = id(new HeraldRuleSerializer())->deserializeRuleComponents($xaction->getNewValue());
             $object->setMustMatchAll((int) $new_state['match_all']);
             $object->attachConditions($new_state['conditions']);
             $object->attachActions($new_state['actions']);
             $object->setRepetitionPolicy(HeraldRepetitionPolicyConfig::toInt($new_state['repetition_policy']));
             return $object;
     }
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:16,代码来源:HeraldRuleEditor.php

示例6: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorMacroTransaction::TYPE_NAME:
             $object->setName($xaction->getNewValue());
             break;
         case PhabricatorMacroTransaction::TYPE_DISABLED:
             $object->setIsDisabled($xaction->getNewValue());
             break;
         case PhabricatorMacroTransaction::TYPE_FILE:
             $object->setFilePHID($xaction->getNewValue());
             break;
         case PhabricatorMacroTransaction::TYPE_AUDIO:
             $object->setAudioPHID($xaction->getNewValue());
             break;
         case PhabricatorMacroTransaction::TYPE_AUDIO_BEHAVIOR:
             $object->setAudioBehavior($xaction->getNewValue());
             break;
     }
 }
开发者ID:pugong,项目名称:phabricator,代码行数:20,代码来源:PhabricatorMacroEditor.php

示例7: 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

示例8: applyCustomInternalTransaction

 protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     switch ($xaction->getTransactionType()) {
         case PhabricatorRepositoryURITransaction::TYPE_URI:
             if (!$this->getIsNewObject()) {
                 $old_uri = $object->getEffectiveURI();
             } else {
                 $old_uri = null;
                 // When creating a URI via the API, we may not have processed the
                 // repository transaction yet. Attach the repository here to make
                 // sure we have it for the calls below.
                 if ($this->repository) {
                     $object->attachRepository($this->repository);
                 }
             }
             $object->setURI($xaction->getNewValue());
             // If we've changed the domain or protocol of the URI, remove the
             // current credential. This improves behavior in several cases:
             // If a user switches between protocols with different credential
             // types, like HTTP and SSH, the old credential won't be valid anyway.
             // It's cleaner to remove it than leave a bad credential in place.
             // If a user switches hosts, the old credential is probably not
             // correct (and potentially confusing/misleading). Removing it forces
             // users to double check that they have the correct credentials.
             // If an attacker can't see a symmetric credential like a username and
             // password, they could still potentially capture it by changing the
             // host for a URI that uses it to `evil.com`, a server they control,
             // then observing the requests. Removing the credential prevents this
             // kind of escalation.
             // Since port and path changes are less likely to fall among these
             // cases, they don't trigger a credential wipe.
             $new_uri = $object->getEffectiveURI();
             if ($old_uri) {
                 $new_proto = $old_uri->getProtocol() != $new_uri->getProtocol();
                 $new_domain = $old_uri->getDomain() != $new_uri->getDomain();
                 if ($new_proto || $new_domain) {
                     $object->setCredentialPHID(null);
                 }
             }
             break;
         case PhabricatorRepositoryURITransaction::TYPE_IO:
             $object->setIOType($xaction->getNewValue());
             break;
         case PhabricatorRepositoryURITransaction::TYPE_DISPLAY:
             $object->setDisplayType($xaction->getNewValue());
             break;
         case PhabricatorRepositoryURITransaction::TYPE_REPOSITORY:
             $object->setRepositoryPHID($xaction->getNewValue());
             $object->attachRepository($this->repository);
             break;
         case PhabricatorRepositoryURITransaction::TYPE_CREDENTIAL:
             $object->setCredentialPHID($xaction->getNewValue());
             break;
         case PhabricatorRepositoryURITransaction::TYPE_DISABLE:
             $object->setIsDisabled($xaction->getNewValue());
             break;
     }
 }
开发者ID:endlessm,项目名称:phabricator,代码行数:58,代码来源:DiffusionURIEditor.php


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