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 PhabricatorProjectNoProjectsDatasource extends PhabricatorTypeaheadDa..

Decoded Output download

<?php

final class PhabricatorProjectNoProjectsDatasource
  extends PhabricatorTypeaheadDatasource {

  public function getBrowseTitle() {
    return pht('Browse Not Tagged With Any Projects');
  }

  public function getPlaceholderText() {
    return pht('Type "not tagged with any projects"...');
  }

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

  public function getDatasourceFunctions() {
    return array(
      'null' => array(
        'name' => pht('Not Tagged With Any Projects'),
        'summary' => pht(
          'Find results which are not tagged with any projects.'),
        'description' => pht(
          "This function matches results which are not tagged with any ".
          "projects. It is usually most often used to find objects which ".
          "might have slipped through the cracks and not been organized ".
          "properly.

%s",
          '> null()'),
      ),
    );
  }

  public function loadResults() {
    $results = array(
      $this->buildNullResult(),
    );

    return $this->filterResultsAgainstTokens($results);
  }

  protected function evaluateFunction($function, array $argv_list) {
    $results = array();

    foreach ($argv_list as $argv) {
      $results[] = new PhabricatorQueryConstraint(
        PhabricatorQueryConstraint::OPERATOR_NULL,
        'empty');
    }

    return $results;
  }

  public function renderFunctionTokens($function, array $argv_list) {
    $results = array();
    foreach ($argv_list as $argv) {
      $results[] = PhabricatorTypeaheadTokenView::newFromTypeaheadResult(
        $this->buildNullResult());
    }
    return $results;
  }

  private function buildNullResult() {
    $name = pht('Not Tagged With Any Projects');

    return $this->newFunctionResult()
      ->setUnique(true)
      ->setPHID('null()')
      ->setIcon('fa-ban')
      ->setName('null '.$name)
      ->setDisplayName($name)
      ->addAttribute(pht('Select results with no tags.'));
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PhabricatorProjectNoProjectsDatasource
  extends PhabricatorTypeaheadDatasource {

  public function getBrowseTitle() {
    return pht('Browse Not Tagged With Any Projects');
  }

  public function getPlaceholderText() {
    return pht('Type "not tagged with any projects"...');
  }

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

  public function getDatasourceFunctions() {
    return array(
      'null' => array(
        'name' => pht('Not Tagged With Any Projects'),
        'summary' => pht(
          'Find results which are not tagged with any projects.'),
        'description' => pht(
          "This function matches results which are not tagged with any ".
          "projects. It is usually most often used to find objects which ".
          "might have slipped through the cracks and not been organized ".
          "properly.\n\n%s",
          '> null()'),
      ),
    );
  }

  public function loadResults() {
    $results = array(
      $this->buildNullResult(),
    );

    return $this->filterResultsAgainstTokens($results);
  }

  protected function evaluateFunction($function, array $argv_list) {
    $results = array();

    foreach ($argv_list as $argv) {
      $results[] = new PhabricatorQueryConstraint(
        PhabricatorQueryConstraint::OPERATOR_NULL,
        'empty');
    }

    return $results;
  }

  public function renderFunctionTokens($function, array $argv_list) {
    $results = array();
    foreach ($argv_list as $argv) {
      $results[] = PhabricatorTypeaheadTokenView::newFromTypeaheadResult(
        $this->buildNullResult());
    }
    return $results;
  }

  private function buildNullResult() {
    $name = pht('Not Tagged With Any Projects');

    return $this->newFunctionResult()
      ->setUnique(true)
      ->setPHID('null()')
      ->setIcon('fa-ban')
      ->setName('null '.$name)
      ->setDisplayName($name)
      ->addAttribute(pht('Select results with no tags.'));
  }

}

Function Calls

None

Variables

None

Stats

MD5 6cbb1be30e3d49016a041bb082e1754b
Eval Count 0
Decode Time 90 ms