示例#1
0
文件: Submit.php 项目: jasmun/Noco100
 /**
  * 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);
 }
示例#2
0
文件: Hash.php 项目: jasmun/Noco100
 /**
  * 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();
 }
示例#3
0
 /**
  * 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);
 }