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 PhabricatorPolicySearchEngineExtension extends PhabricatorSearchEngin..
Decoded Output download
<?php
final class PhabricatorPolicySearchEngineExtension
extends PhabricatorSearchEngineExtension {
const EXTENSIONKEY = 'policy';
public function isExtensionEnabled() {
return true;
}
public function getExtensionName() {
return pht('Support for Policies');
}
public function supportsObject($object) {
return ($object instanceof PhabricatorPolicyInterface);
}
public function getExtensionOrder() {
return 6000;
}
public function getFieldSpecificationsForConduit($object) {
return array(
id(new PhabricatorConduitSearchFieldSpecification())
->setKey('policy')
->setType('map<string, wild>')
->setDescription(pht('Map of capabilities to current policies.')),
);
}
public function getFieldValuesForConduit($object, $data) {
$capabilities = $object->getCapabilities();
$map = array();
foreach ($capabilities as $capability) {
$map[$capability] = $object->getPolicy($capability);
}
return array(
'policy' => $map,
);
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class PhabricatorPolicySearchEngineExtension
extends PhabricatorSearchEngineExtension {
const EXTENSIONKEY = 'policy';
public function isExtensionEnabled() {
return true;
}
public function getExtensionName() {
return pht('Support for Policies');
}
public function supportsObject($object) {
return ($object instanceof PhabricatorPolicyInterface);
}
public function getExtensionOrder() {
return 6000;
}
public function getFieldSpecificationsForConduit($object) {
return array(
id(new PhabricatorConduitSearchFieldSpecification())
->setKey('policy')
->setType('map<string, wild>')
->setDescription(pht('Map of capabilities to current policies.')),
);
}
public function getFieldValuesForConduit($object, $data) {
$capabilities = $object->getCapabilities();
$map = array();
foreach ($capabilities as $capability) {
$map[$capability] = $object->getPolicy($capability);
}
return array(
'policy' => $map,
);
}
}
Function Calls
None |
Stats
MD5 | fecdf31b3a6f1c662bd5902d4d979c4d |
Eval Count | 0 |
Decode Time | 98 ms |