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 DrydockResourceListView extends AphrontView { private $resources; ..

Decoded Output download

<?php

final class DrydockResourceListView extends AphrontView {

  private $resources;

  public function setResources(array $resources) {
    assert_instances_of($resources, 'DrydockResource');
    $this->resources = $resources;
    return $this;
  }

  public function render() {
    $resources = $this->resources;
    $viewer = $this->getUser();

    $view = new PHUIObjectItemListView();
    foreach ($resources as $resource) {
      $id = $resource->getID();

      $item = id(new PHUIObjectItemView())
        ->setHref("/drydock/resource/{$id}/")
        ->setObjectName(pht('Resource %d', $id))
        ->setHeader($resource->getResourceName());

      $icon = $resource->getStatusIcon();
      $color = $resource->getStatusColor();
      $label = $resource->getStatusDisplayName();

      $item->setStatusIcon("{$icon} {$color}", $label);

      $view->addItem($item);
    }

    return $view;
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class DrydockResourceListView extends AphrontView {

  private $resources;

  public function setResources(array $resources) {
    assert_instances_of($resources, 'DrydockResource');
    $this->resources = $resources;
    return $this;
  }

  public function render() {
    $resources = $this->resources;
    $viewer = $this->getUser();

    $view = new PHUIObjectItemListView();
    foreach ($resources as $resource) {
      $id = $resource->getID();

      $item = id(new PHUIObjectItemView())
        ->setHref("/drydock/resource/{$id}/")
        ->setObjectName(pht('Resource %d', $id))
        ->setHeader($resource->getResourceName());

      $icon = $resource->getStatusIcon();
      $color = $resource->getStatusColor();
      $label = $resource->getStatusDisplayName();

      $item->setStatusIcon("{$icon} {$color}", $label);

      $view->addItem($item);
    }

    return $view;
  }

}

Function Calls

None

Variables

None

Stats

MD5 f0d6ed39dde8a948b68662e826046fed
Eval Count 0
Decode Time 89 ms