Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php final class PhluxVariableEditor extends PhabricatorApplicationTransactionEditor {..

Decoded Output download

<?php

final class PhluxVariableEditor
  extends PhabricatorApplicationTransactionEditor {

  public function getEditorApplicationClass() {
    return 'PhabricatorPhluxApplication';
  }

  public function getEditorObjectsDescription() {
    return pht('Phlux Variables');
  }

  public function getTransactionTypes() {
    $types = parent::getTransactionTypes();
    $types[] = PhluxTransaction::TYPE_EDIT_KEY;
    $types[] = PhluxTransaction::TYPE_EDIT_VALUE;
    $types[] = PhabricatorTransactions::TYPE_VIEW_POLICY;
    $types[] = PhabricatorTransactions::TYPE_EDIT_POLICY;
    return $types;
  }

  protected function getCustomTransactionOldValue(
    PhabricatorLiskDAO $object,
    PhabricatorApplicationTransaction $xaction) {
    switch ($xaction->getTransactionType()) {
      case PhluxTransaction::TYPE_EDIT_KEY:
        return $object->getVariableKey();
      case PhluxTransaction::TYPE_EDIT_VALUE:
        return $object->getVariableValue();
    }

    return parent::getCustomTransactionOldValue($object, $xaction);
  }

  protected function getCustomTransactionNewValue(
    PhabricatorLiskDAO $object,
    PhabricatorApplicationTransaction $xaction) {
    switch ($xaction->getTransactionType()) {
      case PhluxTransaction::TYPE_EDIT_KEY:
      case PhluxTransaction::TYPE_EDIT_VALUE:
        return $xaction->getNewValue();
    }
    return parent::getCustomTransactionNewValue($object, $xaction);
  }

  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);
  }

  protected function applyCustomExternalTransaction(
    PhabricatorLiskDAO $object,
    PhabricatorApplicationTransaction $xaction) {
    switch ($xaction->getTransactionType()) {
      case PhluxTransaction::TYPE_EDIT_KEY:
      case PhluxTransaction::TYPE_EDIT_VALUE:
        return;
    }
    return parent::applyCustomExternalTransaction($object, $xaction);
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PhluxVariableEditor
  extends PhabricatorApplicationTransactionEditor {

  public function getEditorApplicationClass() {
    return 'PhabricatorPhluxApplication';
  }

  public function getEditorObjectsDescription() {
    return pht('Phlux Variables');
  }

  public function getTransactionTypes() {
    $types = parent::getTransactionTypes();
    $types[] = PhluxTransaction::TYPE_EDIT_KEY;
    $types[] = PhluxTransaction::TYPE_EDIT_VALUE;
    $types[] = PhabricatorTransactions::TYPE_VIEW_POLICY;
    $types[] = PhabricatorTransactions::TYPE_EDIT_POLICY;
    return $types;
  }

  protected function getCustomTransactionOldValue(
    PhabricatorLiskDAO $object,
    PhabricatorApplicationTransaction $xaction) {
    switch ($xaction->getTransactionType()) {
      case PhluxTransaction::TYPE_EDIT_KEY:
        return $object->getVariableKey();
      case PhluxTransaction::TYPE_EDIT_VALUE:
        return $object->getVariableValue();
    }

    return parent::getCustomTransactionOldValue($object, $xaction);
  }

  protected function getCustomTransactionNewValue(
    PhabricatorLiskDAO $object,
    PhabricatorApplicationTransaction $xaction) {
    switch ($xaction->getTransactionType()) {
      case PhluxTransaction::TYPE_EDIT_KEY:
      case PhluxTransaction::TYPE_EDIT_VALUE:
        return $xaction->getNewValue();
    }
    return parent::getCustomTransactionNewValue($object, $xaction);
  }

  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);
  }

  protected function applyCustomExternalTransaction(
    PhabricatorLiskDAO $object,
    PhabricatorApplicationTransaction $xaction) {
    switch ($xaction->getTransactionType()) {
      case PhluxTransaction::TYPE_EDIT_KEY:
      case PhluxTransaction::TYPE_EDIT_VALUE:
        return;
    }
    return parent::applyCustomExternalTransaction($object, $xaction);
  }

}

Function Calls

None

Variables

None

Stats

MD5 c9841113ed849c2c68dd9e0fba296bc9
Eval Count 0
Decode Time 100 ms