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 PhabricatorDashboardPortalDatasource extends PhabricatorTypeaheadData..

Decoded Output download

<?php

final class PhabricatorDashboardPortalDatasource
  extends PhabricatorTypeaheadDatasource {

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

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

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

  public function loadResults() {
    $results = $this->buildResults();
    return $this->filterResultsAgainstTokens($results);
  }

  protected function renderSpecialTokens(array $values) {
    return $this->renderTokensFromResults($this->buildResults(), $values);
  }

  public function buildResults() {
    $query = new PhabricatorDashboardPortalQuery();

    $this->applyFerretConstraints(
      $query,
      id(new PhabricatorDashboardPortal())->newFerretEngine(),
      'title',
      $this->getRawQuery());

    $portals = $this->executeQuery($query);

    $results = array();
    foreach ($portals as $portal) {
      $result = id(new PhabricatorTypeaheadResult())
        ->setName($portal->getObjectName().' '.$portal->getName())
        ->setPHID($portal->getPHID())
        ->setIcon('fa-compass');

      $results[] = $result;
    }

    return $results;
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PhabricatorDashboardPortalDatasource
  extends PhabricatorTypeaheadDatasource {

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

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

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

  public function loadResults() {
    $results = $this->buildResults();
    return $this->filterResultsAgainstTokens($results);
  }

  protected function renderSpecialTokens(array $values) {
    return $this->renderTokensFromResults($this->buildResults(), $values);
  }

  public function buildResults() {
    $query = new PhabricatorDashboardPortalQuery();

    $this->applyFerretConstraints(
      $query,
      id(new PhabricatorDashboardPortal())->newFerretEngine(),
      'title',
      $this->getRawQuery());

    $portals = $this->executeQuery($query);

    $results = array();
    foreach ($portals as $portal) {
      $result = id(new PhabricatorTypeaheadResult())
        ->setName($portal->getObjectName().' '.$portal->getName())
        ->setPHID($portal->getPHID())
        ->setIcon('fa-compass');

      $results[] = $result;
    }

    return $results;
  }

}

Function Calls

None

Variables

None

Stats

MD5 d9893e650dceadf8061e92bea3bc6b92
Eval Count 0
Decode Time 91 ms