Esempio n. 1
0
 /**
  * Creates a new 
  * @param type $folder The folder with the files to check against
  * @param type $currentFile The current file; excluded when checking.
  * @param type $fileExtension The (default) file extension is auto added to the checked value and current file, if given
  * @param string $errorLabelPrefix The error label prefix
  * @param bool $trimValue True if file name value shall be trimmed
  */
 function __construct($folder, $currentFile = '', $fileExtension = '', $errorLabelPrefix = '', $trimValue = true)
 {
     $this->folder = $folder;
     $this->currentFile = $currentFile;
     $this->fileExtension = $fileExtension;
     parent::__construct($errorLabelPrefix, $trimValue);
 }
Esempio n. 2
0
 function __construct($format, Date $minDate = null, Date $maxDate = null, $errorLabelPrefix = '', $trimValue = true)
 {
     $this->format = $format;
     $this->minDate = $minDate;
     $this->maxDate = $maxDate;
     parent::__construct($errorLabelPrefix, $trimValue);
 }
 protected function __construct($compareValue, $equalsNot = false, $errorLabelPrefix = '', $trimValue = true, $ignoreCase = false)
 {
     $this->compareValue = $compareValue;
     $this->equalsNot = $equalsNot;
     $this->ignoreCase = $ignoreCase;
     parent::__construct($errorLabelPrefix, $trimValue);
 }
 /**
  * Creates a new length validator
  * @param int $minLength
  * @param int $maxLength
  * @param bool $trimValue 
  * @param string errorLabelPrefix;
  */
 function __construct($minLength, $maxLength, $trimValue = true, $errorLabelPrefix = '')
 {
     if ($maxLength >= 0 && $maxLength < $minLength) {
         throw new \InvalidArgumentException('max length must be greater than or equal min length');
     }
     $this->maxLength = $maxLength;
     $this->minLength = $minLength;
     parent::__construct($errorLabelPrefix, $trimValue);
 }
Esempio n. 5
0
 /**
  * 
  * @param type $fieldName
  * @param type $checkUploadError
  * @param type $required
  * @param int $maxSize max size in bytes
  * @param array $mimeTypes
  * @param string $errorLabelPrefix
  */
 function __construct($fieldName, $checkUploadError = true, $required = true, $maxSize = 0, array $mimeTypes = array(), $errorLabelPrefix = '')
 {
     $this->upload = new IO\Upload($fieldName);
     $this->maxSize = $maxSize;
     $this->required = $required;
     $this->checkUploadError = $checkUploadError;
     $this->mimeTypes = $mimeTypes;
     parent::__construct($errorLabelPrefix);
 }
 /**
  * 
  * @param Sql\Select $select
  * @param int $minCount
  * @param int $maxCount
  * @param string $errorLabelPrefix
  */
 function __construct(Sql\Select $prepared, $minCount = 1, $maxCount = 1, $errorLabelPrefix = '')
 {
     $this->prepared = $prepared;
     $this->minCount = (int) $minCount;
     $this->maxCount = (int) $maxCount;
     parent::__construct($errorLabelPrefix);
 }
Esempio n. 7
0
 /**
  * 
  * @param string $errorLabelPrefix The error label prefix
  * @param string $trimValue
  */
 function __construct($errorLabelPrefix = '', $trimValue = true)
 {
     parent::__construct($errorLabelPrefix, $trimValue);
 }
Esempio n. 8
0
 function __construct(AccessBase\Guard $guard, $verifyOnly = false, $errorLabelPrefix = '')
 {
     $this->guard = $guard;
     $this->verifyOnly = $verifyOnly;
     parent::__construct($errorLabelPrefix);
 }
Esempio n. 9
0
 /**
  * Creates an Integer validator
  * @param int $min
  * @param int $max 
  * @param string $errorLabelPrefix
  */
 function __construct($min, $max = PHP_INT_MAX, $errorLabelPrefix = '')
 {
     $this->min = $min;
     $this->max = $max;
     parent::__construct($errorLabelPrefix);
 }