Class Zend_Validate_File_FilesSize

Description

Validator for the size of all files which will be validated in sum

  • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Validate/File/FilesSize.php (line 35)

Zend_Validate_Abstract
   |
   --Zend_Validate_File_Size
      |
      --Zend_Validate_File_FilesSize
Class Constant Summary
 NOT_READABLE = 'fileFilesSizeNotReadable'
 TOO_BIG = 'fileFilesSizeTooBig'
 TOO_SMALL = 'fileFilesSizeTooSmall'
Variable Summary
Method Summary
 void __construct (integer|array|Zend_Config $options)
 boolean isValid (string|array $value, [array $file = null])
Variables
array $_files (line 58)

Internal file array

  • access: protected
array $_messageTemplates = array(
self::TOO_BIG => "All files in sum should have a maximum size of '%max%' but '%size%' were detected",
self::TOO_SMALL => "All files in sum should have a minimum size of '%min%' but '%size%' were detected",
self::NOT_READABLE => "One or more files can not be read",
)
(line 47)
  • var: Error message templates
  • access: protected

Redefinition of:
Zend_Validate_File_Size::$_messageTemplates

Inherited Variables

Inherited from Zend_Validate_File_Size

Zend_Validate_File_Size::$_max
Zend_Validate_File_Size::$_messageVariables
Zend_Validate_File_Size::$_min
Zend_Validate_File_Size::$_size
Zend_Validate_File_Size::$_useByteString

Inherited from Zend_Validate_Abstract

Zend_Validate_Abstract::$_defaultTranslator
Zend_Validate_Abstract::$_errors
Zend_Validate_Abstract::$_messageLength
Zend_Validate_Abstract::$_messages
Zend_Validate_Abstract::$_obscureValue
Zend_Validate_Abstract::$_translator
Zend_Validate_Abstract::$_translatorDisabled
Zend_Validate_Abstract::$_value
Methods
Constructor __construct (line 69)

Sets validator options

Min limits the used diskspace for all files, when used with max=null it is the maximum filesize It also accepts an array with the keys 'min' and 'max'

  • access: public
void __construct (integer|array|Zend_Config $options)
  • integer|array|Zend_Config $options: Options for this validator

Redefinition of:
Zend_Validate_File_Size::__construct()
Sets validator options
isValid (line 105)

Defined by Zend_Validate_Interface

Returns true if and only if the disk usage of all files is at least min and not bigger than max (when max is not null).

  • access: public
boolean isValid (string|array $value, [array $file = null])
  • string|array $value: Real file to check for size
  • array $file: File data from Zend_File_Transfer

Redefinition of:
Zend_Validate_File_Size::isValid()
Defined by Zend_Validate_Interface

Inherited Methods

Inherited From Zend_Validate_File_Size

 Zend_Validate_File_Size::__construct()
 Zend_Validate_File_Size::getMax()
 Zend_Validate_File_Size::getMin()
 Zend_Validate_File_Size::isValid()
 Zend_Validate_File_Size::setMax()
 Zend_Validate_File_Size::setMin()
 Zend_Validate_File_Size::setUseByteString()
 Zend_Validate_File_Size::useByteString()
 Zend_Validate_File_Size::_fromByteString()
 Zend_Validate_File_Size::_getSize()
 Zend_Validate_File_Size::_setSize()
 Zend_Validate_File_Size::_throw()
 Zend_Validate_File_Size::_toByteString()

Inherited From Zend_Validate_Abstract

 Zend_Validate_Abstract::getDefaultTranslator()
 Zend_Validate_Abstract::getErrors()
 Zend_Validate_Abstract::getMessageLength()
 Zend_Validate_Abstract::getMessages()
 Zend_Validate_Abstract::getMessageTemplates()
 Zend_Validate_Abstract::getMessageVariables()
 Zend_Validate_Abstract::getObscureValue()
 Zend_Validate_Abstract::getTranslator()
 Zend_Validate_Abstract::hasDefaultTranslator()
 Zend_Validate_Abstract::hasTranslator()
 Zend_Validate_Abstract::setDefaultTranslator()
 Zend_Validate_Abstract::setDisableTranslator()
 Zend_Validate_Abstract::setMessage()
 Zend_Validate_Abstract::setMessageLength()
 Zend_Validate_Abstract::setMessages()
 Zend_Validate_Abstract::setObscureValue()
 Zend_Validate_Abstract::setTranslator()
 Zend_Validate_Abstract::translatorIsDisabled()
 Zend_Validate_Abstract::_createMessage()
 Zend_Validate_Abstract::_error()
 Zend_Validate_Abstract::_setValue()
 Zend_Validate_Abstract::__get()
Class Constants
NOT_READABLE = 'fileFilesSizeNotReadable' (line 42)
TOO_BIG = 'fileFilesSizeTooBig' (line 40)
TOO_SMALL = 'fileFilesSizeTooSmall' (line 41)

Inherited Constants

Inherited from Zend_Validate_File_Size

Zend_Validate_File_Size::NOT_FOUND
Zend_Validate_File_Size::TOO_BIG
Zend_Validate_File_Size::TOO_SMALL

Documentation generated on Mon, 21 Jun 2010 15:23:38 -0400 by phpDocumentor 1.4.3