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 PhabricatorPhamePostPHIDType extends PhabricatorPHIDType { const TYP..

Decoded Output download

<?php

final class PhabricatorPhamePostPHIDType extends PhabricatorPHIDType {

  const TYPECONST = 'POST';

  public function getTypeName() {
    return pht('Phame Post');
  }

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

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

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

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

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

    foreach ($handles as $phid => $handle) {
      $post = $objects[$phid];
      $handle->setName($post->getTitle());
      $handle->setFullName(pht('Blog Post: ').$post->getTitle());
      $handle->setURI('/J'.$post->getID());

      if ($post->isArchived()) {
        $handle->setStatus(PhabricatorObjectHandle::STATUS_CLOSED);
      }

    }

  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PhabricatorPhamePostPHIDType extends PhabricatorPHIDType {

  const TYPECONST = 'POST';

  public function getTypeName() {
    return pht('Phame Post');
  }

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

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

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

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

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

    foreach ($handles as $phid => $handle) {
      $post = $objects[$phid];
      $handle->setName($post->getTitle());
      $handle->setFullName(pht('Blog Post: ').$post->getTitle());
      $handle->setURI('/J'.$post->getID());

      if ($post->isArchived()) {
        $handle->setStatus(PhabricatorObjectHandle::STATUS_CLOSED);
      }

    }

  }

}

Function Calls

None

Variables

None

Stats

MD5 fb94598367cf61933a437f73834ca94b
Eval Count 0
Decode Time 119 ms