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 DrydockResourcePHIDType extends PhabricatorPHIDType { const TYPECONS..

Decoded Output download

<?php

final class DrydockResourcePHIDType extends PhabricatorPHIDType {

  const TYPECONST = 'DRYR';

  public function getTypeName() {
    return pht('Drydock Resource');
  }

  public function getTypeIcon() {
    return 'fa-map';
  }

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

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

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

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

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

    foreach ($handles as $phid => $handle) {
      $resource = $objects[$phid];
      $id = $resource->getID();

      $handle->setName(
        pht(
          'Resource %d: %s',
          $id,
          $resource->getResourceName()));

      $handle->setURI("/drydock/resource/{$id}/");
    }
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class DrydockResourcePHIDType extends PhabricatorPHIDType {

  const TYPECONST = 'DRYR';

  public function getTypeName() {
    return pht('Drydock Resource');
  }

  public function getTypeIcon() {
    return 'fa-map';
  }

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

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

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

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

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

    foreach ($handles as $phid => $handle) {
      $resource = $objects[$phid];
      $id = $resource->getID();

      $handle->setName(
        pht(
          'Resource %d: %s',
          $id,
          $resource->getResourceName()));

      $handle->setURI("/drydock/resource/{$id}/");
    }
  }

}

Function Calls

None

Variables

None

Stats

MD5 30ff6eb66cab362b0ab05b7791eed459
Eval Count 0
Decode Time 95 ms