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 namespace Phug\Formatter\Element; use Phug\Ast\NodeInterface; use Phug\Parser\Node..
Decoded Output download
<?php
namespace Phug\Formatter\Element;
use Phug\Ast\NodeInterface;
use Phug\Parser\NodeInterface as ParserNode;
use Phug\Util\Partial\AttributeTrait;
use Phug\Util\Partial\NameTrait;
class MarkupElement extends AbstractMarkupElement
{
use AttributeTrait;
use NameTrait;
/**
* @var bool
*/
protected $autoClosed = false;
/**
* MarkupElement constructor.
*
* @param string $name
* @param bool $autoClosed
* @param \SplObjectStorage|null $attributes
* @param ParserNode|null $originNode
* @param NodeInterface|null $parent
* @param array|null $children
*/
public function __construct(
$name,
$autoClosed = false,
\SplObjectStorage $attributes = null,
ParserNode $originNode = null,
NodeInterface $parent = null,
array $children = null
) {
parent::__construct($originNode, $parent, $children);
$this->setName($name);
$this->autoClosed = $autoClosed;
if ($attributes) {
$this->getAttributes()->addAll($attributes);
}
}
public function getAttribute($name)
{
foreach ($this->getAttributes() as $attribute) {
if ($attribute->getName() === $name) {
return $attribute->getValue();
}
}
}
/**
* @return bool
*/
public function isAutoClosed()
{
return $this->autoClosed;
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Phug\Formatter\Element;
use Phug\Ast\NodeInterface;
use Phug\Parser\NodeInterface as ParserNode;
use Phug\Util\Partial\AttributeTrait;
use Phug\Util\Partial\NameTrait;
class MarkupElement extends AbstractMarkupElement
{
use AttributeTrait;
use NameTrait;
/**
* @var bool
*/
protected $autoClosed = false;
/**
* MarkupElement constructor.
*
* @param string $name
* @param bool $autoClosed
* @param \SplObjectStorage|null $attributes
* @param ParserNode|null $originNode
* @param NodeInterface|null $parent
* @param array|null $children
*/
public function __construct(
$name,
$autoClosed = false,
\SplObjectStorage $attributes = null,
ParserNode $originNode = null,
NodeInterface $parent = null,
array $children = null
) {
parent::__construct($originNode, $parent, $children);
$this->setName($name);
$this->autoClosed = $autoClosed;
if ($attributes) {
$this->getAttributes()->addAll($attributes);
}
}
public function getAttribute($name)
{
foreach ($this->getAttributes() as $attribute) {
if ($attribute->getName() === $name) {
return $attribute->getValue();
}
}
}
/**
* @return bool
*/
public function isAutoClosed()
{
return $this->autoClosed;
}
}
Function Calls
None |
Stats
MD5 | 36008dc6afb9efd9c28863d60b564924 |
Eval Count | 0 |
Decode Time | 79 ms |