/** * Constructor * * @param string|array|IfwPsn_Vendor_Zend_Config $spec Element name or configuration * @param string|array|IfwPsn_Vendor_Zend_Config $options Element value or configuration * @return void */ public function __construct($spec, $options = null) { if (is_string($spec) && (null !== $options && is_string($options))) { $options = array('label' => $options); } if (!isset($options['ignore'])) { $options['ignore'] = true; } parent::__construct($spec, $options); }
/** * Constructor * * Creates session namespace for CSRF token, and adds validator for CSRF * token. * * @param string|array|IfwPsn_Vendor_Zend_Config $spec * @param array|IfwPsn_Vendor_Zend_Config $options * @return void */ public function __construct($spec, $options = null) { parent::__construct($spec, $options); $this->setAllowEmpty(false)->setRequired(true)->initCsrfValidator(); }
/** * Constructor * * $spec may be: * - string: name of element * - array: options with which to configure element * - IfwPsn_Vendor_Zend_Config: IfwPsn_Vendor_Zend_Config with options for configuring element * * @param string|array|IfwPsn_Vendor_Zend_Config $spec * @return void */ public function __construct($spec, $options = null) { parent::__construct($spec, $options); $this->setAllowEmpty(true)->setRequired(true)->setAutoInsertNotEmptyValidator(false)->addValidator($this->getCaptcha(), true); }