Newscoop\Form\Element\OldHash::__construct PHP Method

__construct() public method

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
return void
    public function __construct($spec, $options = null)
    {
        parent::__construct($spec, $options);
        $this->setAllowEmpty(false)->setRequired(true)->initCsrfValidator();
    }