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 DivinerBookDatasource extends PhabricatorTypeaheadDatasource { publi..

Decoded Output download

<?php

final class DivinerBookDatasource extends PhabricatorTypeaheadDatasource {

  public function getBrowseTitle() {
    return pht('Browse Books');
  }

  public function getPlaceholderText() {
    return pht('Type a book name...');
  }

  public function getDatasourceApplicationClass() {
    return 'PhabricatorDivinerApplication';
  }

  public function loadResults() {
    $raw_query = $this->getRawQuery();

    $query = id(new DivinerBookQuery())
      ->setOrder('name')
      ->withNamePrefix($raw_query);
    $books = $this->executeQuery($query);

    $results = array();
    foreach ($books as $book) {
      $results[] = id(new PhabricatorTypeaheadResult())
        ->setName($book->getTitle())
        ->setURI('/book/'.$book->getName().'/')
        ->setPHID($book->getPHID())
        ->setPriorityString($book->getName());
    }

    return $results;
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class DivinerBookDatasource extends PhabricatorTypeaheadDatasource {

  public function getBrowseTitle() {
    return pht('Browse Books');
  }

  public function getPlaceholderText() {
    return pht('Type a book name...');
  }

  public function getDatasourceApplicationClass() {
    return 'PhabricatorDivinerApplication';
  }

  public function loadResults() {
    $raw_query = $this->getRawQuery();

    $query = id(new DivinerBookQuery())
      ->setOrder('name')
      ->withNamePrefix($raw_query);
    $books = $this->executeQuery($query);

    $results = array();
    foreach ($books as $book) {
      $results[] = id(new PhabricatorTypeaheadResult())
        ->setName($book->getTitle())
        ->setURI('/book/'.$book->getName().'/')
        ->setPHID($book->getPHID())
        ->setPriorityString($book->getName());
    }

    return $results;
  }

}

Function Calls

None

Variables

None

Stats

MD5 83798a9388500e5f4cc3f24df4ab1147
Eval Count 0
Decode Time 79 ms