1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-12 00:17:07 +01:00
openstamanager/lib/classes/HTMLBuilder/Manager/CSRFManager.php
Thomas Zilio 1c9e7b1634 Commit iniziale (r1662)
Migrazione da SourceForge, partendo dal commit 1662 della carrtella trunk/openstamanager.
2017-08-04 16:28:16 +02:00

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;
}
}