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 PhabricatorRemarkupDocumentEngine extends PhabricatorDocumentEngine {..
Decoded Output download
<?php
final class PhabricatorRemarkupDocumentEngine
extends PhabricatorDocumentEngine {
const ENGINEKEY = 'remarkup';
public function getViewAsLabel(PhabricatorDocumentRef $ref) {
return pht('View as Remarkup');
}
protected function getDocumentIconIcon(PhabricatorDocumentRef $ref) {
return 'fa-file-text-o';
}
protected function getContentScore(PhabricatorDocumentRef $ref) {
$name = $ref->getName();
if ($name !== null) {
if (preg_match('/\.remarkup\z/i', $name)) {
return 2000;
}
}
return 500;
}
protected function canRenderDocumentType(PhabricatorDocumentRef $ref) {
return $ref->isProbablyText();
}
protected function newDocumentContent(PhabricatorDocumentRef $ref) {
$viewer = $this->getViewer();
$content = $ref->loadData();
$content = phutil_utf8ize($content);
$remarkup = new PHUIRemarkupView($viewer, $content);
$container = phutil_tag(
'div',
array(
'class' => 'document-engine-remarkup',
),
$remarkup);
return $container;
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class PhabricatorRemarkupDocumentEngine
extends PhabricatorDocumentEngine {
const ENGINEKEY = 'remarkup';
public function getViewAsLabel(PhabricatorDocumentRef $ref) {
return pht('View as Remarkup');
}
protected function getDocumentIconIcon(PhabricatorDocumentRef $ref) {
return 'fa-file-text-o';
}
protected function getContentScore(PhabricatorDocumentRef $ref) {
$name = $ref->getName();
if ($name !== null) {
if (preg_match('/\\.remarkup\z/i', $name)) {
return 2000;
}
}
return 500;
}
protected function canRenderDocumentType(PhabricatorDocumentRef $ref) {
return $ref->isProbablyText();
}
protected function newDocumentContent(PhabricatorDocumentRef $ref) {
$viewer = $this->getViewer();
$content = $ref->loadData();
$content = phutil_utf8ize($content);
$remarkup = new PHUIRemarkupView($viewer, $content);
$container = phutil_tag(
'div',
array(
'class' => 'document-engine-remarkup',
),
$remarkup);
return $container;
}
}
Function Calls
None |
Stats
MD5 | 9ee9dd1fb28991166a8e8d320fc740ca |
Eval Count | 0 |
Decode Time | 152 ms |