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 HeraldRuleTypeDatasource extends PhabricatorTypeaheadDatasource { ..
Decoded Output download
<?php
final class HeraldRuleTypeDatasource
extends PhabricatorTypeaheadDatasource {
public function getBrowseTitle() {
return pht('Browse Rule Types');
}
public function getPlaceholderText() {
return pht('Type a rule type...');
}
public function getDatasourceApplicationClass() {
return 'PhabricatorHeraldApplication';
}
public function loadResults() {
$results = $this->buildResults();
return $this->filterResultsAgainstTokens($results);
}
protected function renderSpecialTokens(array $values) {
return $this->renderTokensFromResults($this->buildResults(), $values);
}
private function buildResults() {
$results = array();
$type_map = HeraldRuleTypeConfig::getRuleTypeMap();
foreach ($type_map as $type => $name) {
$result = id(new PhabricatorTypeaheadResult())
->setPHID($type)
->setName($name);
$results[$type] = $result;
}
return $results;
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class HeraldRuleTypeDatasource
extends PhabricatorTypeaheadDatasource {
public function getBrowseTitle() {
return pht('Browse Rule Types');
}
public function getPlaceholderText() {
return pht('Type a rule type...');
}
public function getDatasourceApplicationClass() {
return 'PhabricatorHeraldApplication';
}
public function loadResults() {
$results = $this->buildResults();
return $this->filterResultsAgainstTokens($results);
}
protected function renderSpecialTokens(array $values) {
return $this->renderTokensFromResults($this->buildResults(), $values);
}
private function buildResults() {
$results = array();
$type_map = HeraldRuleTypeConfig::getRuleTypeMap();
foreach ($type_map as $type => $name) {
$result = id(new PhabricatorTypeaheadResult())
->setPHID($type)
->setName($name);
$results[$type] = $result;
}
return $results;
}
}
Function Calls
None |
Stats
MD5 | e81bbc5e1e8a52c7a174a5cfff9ca39a |
Eval Count | 0 |
Decode Time | 121 ms |