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 DrydockBlueprintPHIDType extends PhabricatorPHIDType { const TYPECON..

Decoded Output download

<?php

final class DrydockBlueprintPHIDType extends PhabricatorPHIDType {

  const TYPECONST = 'DRYB';

  public function getTypeName() {
    return pht('Blueprint');
  }

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

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

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

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

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

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

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

      $handle
        ->setName($name)
        ->setFullName(pht('Blueprint %d: %s', $id, $name))
        ->setURI("/drydock/blueprint/{$id}/");
    }
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class DrydockBlueprintPHIDType extends PhabricatorPHIDType {

  const TYPECONST = 'DRYB';

  public function getTypeName() {
    return pht('Blueprint');
  }

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

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

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

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

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

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

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

      $handle
        ->setName($name)
        ->setFullName(pht('Blueprint %d: %s', $id, $name))
        ->setURI("/drydock/blueprint/{$id}/");
    }
  }

}

Function Calls

None

Variables

None

Stats

MD5 505de2e91a4157a4c64c31a26281af88
Eval Count 0
Decode Time 89 ms