mirror of
https://github.com/devcode-it/openstamanager.git
synced 2024-12-12 00:17:07 +01:00
1c9e7b1634
Migrazione da SourceForge, partendo dal commit 1662 della carrtella trunk/openstamanager.
24 lines
484 B
PHP
24 lines
484 B
PHP
<?php
|
|
|
|
namespace HTMLBuilder\Manager;
|
|
|
|
/**
|
|
* @since 2.3
|
|
*/
|
|
class CSRFManager implements ManagerInterface
|
|
{
|
|
public function manage($options)
|
|
{
|
|
$token = \CSRF::getInstance()->getToken();
|
|
|
|
$keys = array_keys($token);
|
|
$values = array_values($token);
|
|
|
|
$result = '
|
|
{[ "type": "hidden", "name": "'.$keys[0].'", "value": "'.$values[0].'" ]}
|
|
{[ "type": "hidden", "name": "'.$keys[1].'", "value": "'.$values[1].'" ]}';
|
|
|
|
return $result;
|
|
}
|
|
}
|