PHP Class Newscoop\Form\Element\OldHash

Inheritance: extends Zend_Form_Element_Xhtm\Zend_Form_Element_Xhtml
Afficher le fichier Open project: sourcefabric/newscoop

Méthodes publiques

Свойство Type Description
$helper string Use formHidden view helper by default

Protected Properties

Свойство Type Description
$_hash mixed Actual hash used.

Méthodes publiques

Méthode Description
__construct ( string | array | Zend_Config $spec, array | Zend_Config $options = null ) : void Constructor
getHash ( ) : string Retrieve CSRF token
getLabel ( ) : null Override getLabel() to always be empty
initCsrfValidator ( ) : Zend_Form_Element_Hash Initialize CSRF validator
render ( Zend_View_Interface $view = null ) : string Render CSRF token in form

Method Details

__construct() public méthode

Creates session namespace for CSRF token, and adds validator for CSRF token.
public __construct ( string | array | Zend_Config $spec, array | Zend_Config $options = null ) : void
$spec string | array | Zend_Config
$options array | Zend_Config
Résultat void

getHash() public méthode

If no CSRF token currently exists, generates one.
public getHash ( ) : string
Résultat string

getLabel() public méthode

Override getLabel() to always be empty
public getLabel ( ) : null
Résultat null

initCsrfValidator() public méthode

Creates Session namespace, and initializes CSRF token in session. Additionally, adds validator for validating CSRF token.
public initCsrfValidator ( ) : Zend_Form_Element_Hash
Résultat Zend_Form_Element_Hash

render() public méthode

Render CSRF token in form
public render ( Zend_View_Interface $view = null ) : string
$view Zend_View_Interface
Résultat string

Property Details

$_hash protected_oe property

Actual hash used.
protected mixed $_hash
Résultat mixed

$helper public_oe property

Use formHidden view helper by default
public string $helper
Résultat string