Exemplo n.º 1
0
 /**
  * Constructor
  *
  * @param array $options
  */
 public function __construct($options = null)
 {
     parent::__construct($options);
     if (is_array($options)) {
         if (array_key_exists('allowWhiteSpace', $options)) {
             $this->setAllowWhiteSpace($options['allowWhiteSpace']);
         }
     }
 }
Exemplo n.º 2
0
 /**
  * Constructor
  *
  * @param array $options
  */
 public function __construct($options = null)
 {
     parent::__construct($options);
     if (is_array($options)) {
         if (array_key_exists('pattern', $options) && is_string($options['pattern'])) {
             $this->setPattern($options['pattern']);
         }
     }
 }
Exemplo n.º 3
0
 /**
  * Constructor
  *
  * @param array $options
  */
 public function __construct($options = null)
 {
     parent::__construct($options);
     if (is_array($options)) {
         if (array_key_exists('privateKey', $options)) {
             $this->_privateKey = $options['privateKey'];
         }
     }
 }
 /**
  * Constructor
  *
  * @param array $options
  */
 public function __construct($options = null)
 {
     parent::__construct($options);
     if (is_array($options)) {
         if (array_key_exists('min', $options)) {
             $this->setMin($options['min']);
         }
     }
 }
Exemplo n.º 5
0
 /**
  * Constructor
  *
  * @param array $options
  */
 public function __construct($options = null)
 {
     parent::__construct($options);
     if (is_array($options)) {
         if (array_key_exists('haystack', $options) && is_array($options['haystack'])) {
             $this->setHaystack($options['haystack']);
         }
         if (array_key_exists('strict', $options)) {
             $this->setStrict($options['strict']);
         }
     }
 }
Exemplo n.º 6
0
 /**
  * Constructor
  *
  * @param string|array $options Token or options
  */
 public function __construct($options = null)
 {
     parent::__construct($options);
     if (is_array($options)) {
         if (array_key_exists('token', $options)) {
             $this->setToken($options['token']);
         }
     } else {
         if ($options !== null) {
             $this->setToken($options);
         }
     }
 }
 /**
  * Constructor
  *
  * A string with the name of the element or an array of
  * options with a name key is required
  *
  * @param string|array $options
  */
 public function __construct($options = null)
 {
     parent::__construct($options);
     if (is_string($options)) {
         $this->setName($options);
     } elseif (is_array($options)) {
         if (array_key_exists('name', $options)) {
             $this->setName($options['name']);
         }
         if (array_key_exists('allowedExtensions', $options)) {
             $this->setAllowedExtensions($options['allowedExtensions']);
         }
         if (array_key_exists('maximumFileSize', $options)) {
             $this->setMaximumFileSize($options['maximumFileSize']);
         }
         if (array_key_exists('required', $options)) {
             $this->setRequired($options['required']);
         }
     }
 }