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 PhabricatorCalendarExportPHIDType extends PhabricatorPHIDType { cons..

Decoded Output download

<?php

final class PhabricatorCalendarExportPHIDType extends PhabricatorPHIDType {

  const TYPECONST = 'CEXP';

  public function getTypeName() {
    return pht('Calendar Export');
  }

  public function newObject() {
    return new PhabricatorCalendarExport();
  }

  public function getPHIDTypeApplicationClass() {
    return 'PhabricatorCalendarApplication';
  }

  protected function buildQueryForObjects(
    PhabricatorObjectQuery $query,
    array $phids) {

    return id(new PhabricatorCalendarExportQuery())
      ->withPHIDs($phids);
  }

  public function loadHandles(
    PhabricatorHandleQuery $query,
    array $handles,
    array $objects) {

    foreach ($handles as $phid => $handle) {
      $export = $objects[$phid];

      $id = $export->getID();
      $name = $export->getName();
      $uri = $export->getURI();

      $handle
        ->setName($name)
        ->setFullName(pht('Calendar Export %s: %s', $id, $name))
        ->setURI($uri);

      if ($export->getIsDisabled()) {
        $handle->setStatus(PhabricatorObjectHandle::STATUS_CLOSED);
      }
    }
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PhabricatorCalendarExportPHIDType extends PhabricatorPHIDType {

  const TYPECONST = 'CEXP';

  public function getTypeName() {
    return pht('Calendar Export');
  }

  public function newObject() {
    return new PhabricatorCalendarExport();
  }

  public function getPHIDTypeApplicationClass() {
    return 'PhabricatorCalendarApplication';
  }

  protected function buildQueryForObjects(
    PhabricatorObjectQuery $query,
    array $phids) {

    return id(new PhabricatorCalendarExportQuery())
      ->withPHIDs($phids);
  }

  public function loadHandles(
    PhabricatorHandleQuery $query,
    array $handles,
    array $objects) {

    foreach ($handles as $phid => $handle) {
      $export = $objects[$phid];

      $id = $export->getID();
      $name = $export->getName();
      $uri = $export->getURI();

      $handle
        ->setName($name)
        ->setFullName(pht('Calendar Export %s: %s', $id, $name))
        ->setURI($uri);

      if ($export->getIsDisabled()) {
        $handle->setStatus(PhabricatorObjectHandle::STATUS_CLOSED);
      }
    }
  }

}

Function Calls

None

Variables

None

Stats

MD5 85d644f5a4c66c61e0ba2ae0dc3bb221
Eval Count 0
Decode Time 98 ms