本文整理汇总了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);
}
示例2: applyCustomInternalTransaction
protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
{
switch ($xaction->getTransactionType()) {
case HeraldRuleTransaction::TYPE_DISABLE:
return $object->setIsDisabled($xaction->getNewValue());
}
}
示例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);
}
示例4: applyCustomInternalTransaction
protected function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
{
switch ($xaction->getTransactionType()) {
case NuanceQueueTransaction::TYPE_NAME:
$object->setName($xaction->getNewValue());
break;
}
}
示例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);
}
示例6: applyCustomInternalTransaction
public function applyCustomInternalTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
{
$new = $xaction->getNewValue();
switch ($xaction->getTransactionType()) {
case ReleephProductTransaction::TYPE_ACTIVE:
$object->setIsActive($new);
break;
}
}
示例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);
}
示例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;
}
}
示例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;
}
示例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;
}
示例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;
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}