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 Pagekit\View\Helper; use Pagekit\Session\Csrf\Provider\CsrfProviderInter..
Decoded Output download
<?php
namespace Pagekit\View\Helper;
use Pagekit\Session\Csrf\Provider\CsrfProviderInterface;
class TokenHelper extends Helper
{
/**
* @var CsrfProviderInterface
*/
protected $provider;
/**
* Constructor.
*
* @param CsrfProviderInterface $provider
*/
public function __construct(CsrfProviderInterface $provider)
{
$this->provider = $provider;
}
/**
* Displays a hidden token field to reduce the risk of CSRF exploits.
*
* @param string $name
*/
public function get($name = '_csrf')
{
printf('<input type="hidden" name="%s" value="%s">', $name, $this->provider->generate());
}
/**
* {@inheritdoc}
*/
public function getName()
{
return 'token';
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Pagekit\View\Helper;
use Pagekit\Session\Csrf\Provider\CsrfProviderInterface;
class TokenHelper extends Helper
{
/**
* @var CsrfProviderInterface
*/
protected $provider;
/**
* Constructor.
*
* @param CsrfProviderInterface $provider
*/
public function __construct(CsrfProviderInterface $provider)
{
$this->provider = $provider;
}
/**
* Displays a hidden token field to reduce the risk of CSRF exploits.
*
* @param string $name
*/
public function get($name = '_csrf')
{
printf('<input type="hidden" name="%s" value="%s">', $name, $this->provider->generate());
}
/**
* {@inheritdoc}
*/
public function getName()
{
return 'token';
}
}
Function Calls
None |
Stats
MD5 | 3a55b70540d8a5f993a047ae4560658c |
Eval Count | 0 |
Decode Time | 80 ms |