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 DrydockLog extends DrydockDAO implements PhabricatorPolicyInterface {..
Decoded Output download
<?php
final class DrydockLog extends DrydockDAO
implements PhabricatorPolicyInterface {
protected $blueprintPHID;
protected $resourcePHID;
protected $leasePHID;
protected $operationPHID;
protected $epoch;
protected $type;
protected $data = array();
private $blueprint = self::ATTACHABLE;
private $resource = self::ATTACHABLE;
private $lease = self::ATTACHABLE;
private $operation = self::ATTACHABLE;
protected function getConfiguration() {
return array(
self::CONFIG_TIMESTAMPS => false,
self::CONFIG_SERIALIZATION => array(
'data' => self::SERIALIZATION_JSON,
),
self::CONFIG_COLUMN_SCHEMA => array(
'blueprintPHID' => 'phid?',
'resourcePHID' => 'phid?',
'leasePHID' => 'phid?',
'operationPHID' => 'phid?',
'type' => 'text64',
),
self::CONFIG_KEY_SCHEMA => array(
'key_blueprint' => array(
'columns' => array('blueprintPHID', 'type'),
),
'key_resource' => array(
'columns' => array('resourcePHID', 'type'),
),
'key_lease' => array(
'columns' => array('leasePHID', 'type'),
),
'key_operation' => array(
'columns' => array('operationPHID', 'type'),
),
'epoch' => array(
'columns' => array('epoch'),
),
),
) + parent::getConfiguration();
}
public function attachBlueprint(DrydockBlueprint $blueprint = null) {
$this->blueprint = $blueprint;
return $this;
}
public function getBlueprint() {
return $this->assertAttached($this->blueprint);
}
public function attachResource(DrydockResource $resource = null) {
$this->resource = $resource;
return $this;
}
public function getResource() {
return $this->assertAttached($this->resource);
}
public function attachLease(DrydockLease $lease = null) {
$this->lease = $lease;
return $this;
}
public function getLease() {
return $this->assertAttached($this->lease);
}
public function attachOperation(
DrydockRepositoryOperation $operation = null) {
$this->operation = $operation;
return $this;
}
public function getOperation() {
return $this->assertAttached($this->operation);
}
public function isComplete() {
if ($this->getBlueprintPHID() && !$this->getBlueprint()) {
return false;
}
if ($this->getResourcePHID() && !$this->getResource()) {
return false;
}
if ($this->getLeasePHID() && !$this->getLease()) {
return false;
}
if ($this->getOperationPHID() && !$this->getOperation()) {
return false;
}
return true;
}
/* -( PhabricatorPolicyInterface )----------------------------------------- */
public function getCapabilities() {
return array(
PhabricatorPolicyCapability::CAN_VIEW,
);
}
public function getPolicy($capability) {
// NOTE: We let you see that logs exist no matter what, but don't actually
// show you log content unless you can see all of the associated objects.
return PhabricatorPolicies::getMostOpenPolicy();
}
public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {
return false;
}
public function describeAutomaticCapability($capability) {
return pht(
'To view log details, you must be able to view all associated '.
'blueprints, resources, leases, and repository operations.');
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class DrydockLog extends DrydockDAO
implements PhabricatorPolicyInterface {
protected $blueprintPHID;
protected $resourcePHID;
protected $leasePHID;
protected $operationPHID;
protected $epoch;
protected $type;
protected $data = array();
private $blueprint = self::ATTACHABLE;
private $resource = self::ATTACHABLE;
private $lease = self::ATTACHABLE;
private $operation = self::ATTACHABLE;
protected function getConfiguration() {
return array(
self::CONFIG_TIMESTAMPS => false,
self::CONFIG_SERIALIZATION => array(
'data' => self::SERIALIZATION_JSON,
),
self::CONFIG_COLUMN_SCHEMA => array(
'blueprintPHID' => 'phid?',
'resourcePHID' => 'phid?',
'leasePHID' => 'phid?',
'operationPHID' => 'phid?',
'type' => 'text64',
),
self::CONFIG_KEY_SCHEMA => array(
'key_blueprint' => array(
'columns' => array('blueprintPHID', 'type'),
),
'key_resource' => array(
'columns' => array('resourcePHID', 'type'),
),
'key_lease' => array(
'columns' => array('leasePHID', 'type'),
),
'key_operation' => array(
'columns' => array('operationPHID', 'type'),
),
'epoch' => array(
'columns' => array('epoch'),
),
),
) + parent::getConfiguration();
}
public function attachBlueprint(DrydockBlueprint $blueprint = null) {
$this->blueprint = $blueprint;
return $this;
}
public function getBlueprint() {
return $this->assertAttached($this->blueprint);
}
public function attachResource(DrydockResource $resource = null) {
$this->resource = $resource;
return $this;
}
public function getResource() {
return $this->assertAttached($this->resource);
}
public function attachLease(DrydockLease $lease = null) {
$this->lease = $lease;
return $this;
}
public function getLease() {
return $this->assertAttached($this->lease);
}
public function attachOperation(
DrydockRepositoryOperation $operation = null) {
$this->operation = $operation;
return $this;
}
public function getOperation() {
return $this->assertAttached($this->operation);
}
public function isComplete() {
if ($this->getBlueprintPHID() && !$this->getBlueprint()) {
return false;
}
if ($this->getResourcePHID() && !$this->getResource()) {
return false;
}
if ($this->getLeasePHID() && !$this->getLease()) {
return false;
}
if ($this->getOperationPHID() && !$this->getOperation()) {
return false;
}
return true;
}
/* -( PhabricatorPolicyInterface )----------------------------------------- */
public function getCapabilities() {
return array(
PhabricatorPolicyCapability::CAN_VIEW,
);
}
public function getPolicy($capability) {
// NOTE: We let you see that logs exist no matter what, but don't actually
// show you log content unless you can see all of the associated objects.
return PhabricatorPolicies::getMostOpenPolicy();
}
public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {
return false;
}
public function describeAutomaticCapability($capability) {
return pht(
'To view log details, you must be able to view all associated '.
'blueprints, resources, leases, and repository operations.');
}
}
Function Calls
None |
Stats
MD5 | 1e48e3b33e75261b9249bb449d8f7570 |
Eval Count | 0 |
Decode Time | 82 ms |