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 /** * This file is part of the LidaaTwigBundle package. */ namespace Lidaa\TwigB..
Decoded Output download
<?php
/**
* This file is part of the LidaaTwigBundle package.
*/
namespace Lidaa\TwigBundle\Helper;
use Symfony\Component\Templating\Helper\HelperInterface;
/**
* JsHelper
*
* @author Lidaa <[email protected]>
*/
class JsHelper
{
private $assets;
public function __construct(HelperInterface $assets)
{
$this->assets = $assets;
}
public function renderJsTag($path, $options)
{
$packageName = null;
$src = $this->assets->getUrl($path, $packageName);
if (!key_exists('type', $options))
$options['type'] = 'text/javascript';
$attributes = '';
foreach ($options as $key => $value) {
$attributes.= ' ' . $key . '="' . $value . '"';
}
return '<script src="' . $src . '"' . $attributes . ' ></script>';
}
}
?>
Did this file decode correctly?
Original Code
<?php
/**
* This file is part of the LidaaTwigBundle package.
*/
namespace Lidaa\TwigBundle\Helper;
use Symfony\Component\Templating\Helper\HelperInterface;
/**
* JsHelper
*
* @author Lidaa <[email protected]>
*/
class JsHelper
{
private $assets;
public function __construct(HelperInterface $assets)
{
$this->assets = $assets;
}
public function renderJsTag($path, $options)
{
$packageName = null;
$src = $this->assets->getUrl($path, $packageName);
if (!key_exists('type', $options))
$options['type'] = 'text/javascript';
$attributes = '';
foreach ($options as $key => $value) {
$attributes.= ' ' . $key . '="' . $value . '"';
}
return '<script src="' . $src . '"' . $attributes . ' ></script>';
}
}
Function Calls
| None |
Stats
| MD5 | 48dd157d302a5b2c583cfae6b1a32038 |
| Eval Count | 0 |
| Decode Time | 104 ms |