本文整理匯總了PHP中PhabricatorLiskDAO::getIsEnabled方法的典型用法代碼示例。如果您正苦於以下問題:PHP PhabricatorLiskDAO::getIsEnabled方法的具體用法?PHP PhabricatorLiskDAO::getIsEnabled怎麽用?PHP PhabricatorLiskDAO::getIsEnabled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PhabricatorLiskDAO
的用法示例。
在下文中一共展示了PhabricatorLiskDAO::getIsEnabled方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getCustomTransactionOldValue
protected function getCustomTransactionOldValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
{
switch ($xaction->getTransactionType()) {
case PhabricatorAuthProviderConfigTransaction::TYPE_ENABLE:
if ($object->getIsEnabled() === null) {
return null;
} else {
return (int) $object->getIsEnabled();
}
case PhabricatorAuthProviderConfigTransaction::TYPE_LOGIN:
return (int) $object->getShouldAllowLogin();
case PhabricatorAuthProviderConfigTransaction::TYPE_REGISTRATION:
return (int) $object->getShouldAllowRegistration();
case PhabricatorAuthProviderConfigTransaction::TYPE_LINK:
return (int) $object->getShouldAllowLink();
case PhabricatorAuthProviderConfigTransaction::TYPE_UNLINK:
return (int) $object->getShouldAllowUnlink();
case PhabricatorAuthProviderConfigTransaction::TYPE_TRUST_EMAILS:
return (int) $object->getShouldTrustEmails();
case PhabricatorAuthProviderConfigTransaction::TYPE_AUTO_LOGIN:
return (int) $object->getShouldAutoLogin();
case PhabricatorAuthProviderConfigTransaction::TYPE_PROPERTY:
$key = $xaction->getMetadataValue(PhabricatorAuthProviderConfigTransaction::PROPERTY_KEY);
return $object->getProperty($key);
}
}
示例2: getCustomTransactionOldValue
protected function getCustomTransactionOldValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
{
switch ($xaction->getTransactionType()) {
case PhortunePaymentProviderConfigTransaction::TYPE_CREATE:
return null;
case PhortunePaymentProviderConfigTransaction::TYPE_ENABLE:
return (int) $object->getIsEnabled();
case PhortunePaymentProviderConfigTransaction::TYPE_PROPERTY:
$property_key = $xaction->getMetadataValue(PhortunePaymentProviderConfigTransaction::PROPERTY_KEY);
return $object->getMetadataValue($property_key);
}
return parent::getCustomTransactionOldValue($object, $xaction);
}