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 PhameBlogStatusTransaction extends PhameBlogTransactionType { cons..
Decoded Output download
<?php
final class PhameBlogStatusTransaction
extends PhameBlogTransactionType {
const TRANSACTIONTYPE = 'phame.blog.status';
public function generateOldValue($object) {
return $object->getStatus();
}
public function applyInternalEffects($object, $value) {
$object->setStatus($value);
}
public function getTitle() {
$new = $this->getNewValue();
switch ($new) {
case PhameBlog::STATUS_ACTIVE:
return pht(
'%s published this blog.',
$this->renderAuthor());
case PhameBlog::STATUS_ARCHIVED:
return pht(
'%s archived this blog.',
$this->renderAuthor());
}
}
public function getTitleForFeed() {
$new = $this->getNewValue();
switch ($new) {
case PhameBlog::STATUS_ACTIVE:
return pht(
'%s published the blog %s.',
$this->renderAuthor(),
$this->renderObject());
case PhameBlog::STATUS_ARCHIVED:
return pht(
'%s archived the blog %s.',
$this->renderAuthor(),
$this->renderObject());
}
}
public function getIcon() {
$new = $this->getNewValue();
if ($new == PhameBlog::STATUS_ARCHIVED) {
return 'fa-ban';
} else {
return 'fa-check';
}
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class PhameBlogStatusTransaction
extends PhameBlogTransactionType {
const TRANSACTIONTYPE = 'phame.blog.status';
public function generateOldValue($object) {
return $object->getStatus();
}
public function applyInternalEffects($object, $value) {
$object->setStatus($value);
}
public function getTitle() {
$new = $this->getNewValue();
switch ($new) {
case PhameBlog::STATUS_ACTIVE:
return pht(
'%s published this blog.',
$this->renderAuthor());
case PhameBlog::STATUS_ARCHIVED:
return pht(
'%s archived this blog.',
$this->renderAuthor());
}
}
public function getTitleForFeed() {
$new = $this->getNewValue();
switch ($new) {
case PhameBlog::STATUS_ACTIVE:
return pht(
'%s published the blog %s.',
$this->renderAuthor(),
$this->renderObject());
case PhameBlog::STATUS_ARCHIVED:
return pht(
'%s archived the blog %s.',
$this->renderAuthor(),
$this->renderObject());
}
}
public function getIcon() {
$new = $this->getNewValue();
if ($new == PhameBlog::STATUS_ARCHIVED) {
return 'fa-ban';
} else {
return 'fa-check';
}
}
}
Function Calls
None |
Stats
MD5 | e0091c611e0a9d01d7dd159a9080e301 |
Eval Count | 0 |
Decode Time | 92 ms |