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 abstract class MultimeterController extends PhabricatorController { private $dim..
Decoded Output download
<?php
abstract class MultimeterController extends PhabricatorController {
private $dimensions = array();
protected function loadDimensions(array $rows) {
if (!$rows) {
return;
}
$map = array(
'eventLabelID' => new MultimeterLabel(),
'eventViewerID' => new MultimeterViewer(),
'eventHostID' => new MultimeterHost(),
'eventContextID' => new MultimeterContext(),
);
$ids = array();
foreach ($map as $key => $object) {
foreach ($rows as $row) {
$ids[$key][] = $row[$key];
}
}
foreach ($ids as $key => $list) {
$object = $map[$key];
if (empty($this->dimensions[$key])) {
$this->dimensions[$key] = array();
}
$this->dimensions[$key] += $object->loadAllWhere(
'id IN (%Ld)',
$list);
}
}
protected function getLabelDimension($id) {
if (empty($this->dimensions['eventLabelID'][$id])) {
return $this->newMissingDimension(new MultimeterLabel(), $id);
}
return $this->dimensions['eventLabelID'][$id];
}
protected function getViewerDimension($id) {
if (empty($this->dimensions['eventViewerID'][$id])) {
return $this->newMissingDimension(new MultimeterViewer(), $id);
}
return $this->dimensions['eventViewerID'][$id];
}
protected function getHostDimension($id) {
if (empty($this->dimensions['eventHostID'][$id])) {
return $this->newMissingDimension(new MultimeterHost(), $id);
}
return $this->dimensions['eventHostID'][$id];
}
protected function getContextDimension($id) {
if (empty($this->dimensions['eventContextID'][$id])) {
return $this->newMissingDimension(new MultimeterContext(), $id);
}
return $this->dimensions['eventContextID'][$id];
}
private function newMissingDimension(MultimeterDimension $dim, $id) {
$dim->setName('<missing:'.$id.'>');
return $dim;
}
}
?>
Did this file decode correctly?
Original Code
<?php
abstract class MultimeterController extends PhabricatorController {
private $dimensions = array();
protected function loadDimensions(array $rows) {
if (!$rows) {
return;
}
$map = array(
'eventLabelID' => new MultimeterLabel(),
'eventViewerID' => new MultimeterViewer(),
'eventHostID' => new MultimeterHost(),
'eventContextID' => new MultimeterContext(),
);
$ids = array();
foreach ($map as $key => $object) {
foreach ($rows as $row) {
$ids[$key][] = $row[$key];
}
}
foreach ($ids as $key => $list) {
$object = $map[$key];
if (empty($this->dimensions[$key])) {
$this->dimensions[$key] = array();
}
$this->dimensions[$key] += $object->loadAllWhere(
'id IN (%Ld)',
$list);
}
}
protected function getLabelDimension($id) {
if (empty($this->dimensions['eventLabelID'][$id])) {
return $this->newMissingDimension(new MultimeterLabel(), $id);
}
return $this->dimensions['eventLabelID'][$id];
}
protected function getViewerDimension($id) {
if (empty($this->dimensions['eventViewerID'][$id])) {
return $this->newMissingDimension(new MultimeterViewer(), $id);
}
return $this->dimensions['eventViewerID'][$id];
}
protected function getHostDimension($id) {
if (empty($this->dimensions['eventHostID'][$id])) {
return $this->newMissingDimension(new MultimeterHost(), $id);
}
return $this->dimensions['eventHostID'][$id];
}
protected function getContextDimension($id) {
if (empty($this->dimensions['eventContextID'][$id])) {
return $this->newMissingDimension(new MultimeterContext(), $id);
}
return $this->dimensions['eventContextID'][$id];
}
private function newMissingDimension(MultimeterDimension $dim, $id) {
$dim->setName('<missing:'.$id.'>');
return $dim;
}
}
Function Calls
None |
Stats
MD5 | 86d8de82872849ca200c7d43e1ce4545 |
Eval Count | 0 |
Decode Time | 76 ms |