## iPhorm_Element_File

Description

Located in /iPhorm/Element/File.php (line 3)

    iPhorm_Element
       |
       --iPhorm_Element_File

Variable Summary
iPhorm_Validator_FileUpload $_fileUploadValidator
boolean $_skipRender
Method Summary
iPhorm_Element_File __construct ( $name, [ $label = ''], [ $options = array()])
array getAllowedExtensions ()
iPhorm_Validator_FileUpload getFileUploadValidator ()
int|float getMaximumFileSize ()
boolean getRequired ()
int getRequiredCount ()
boolean isValid (string $value, [array $context = null])
void setAllowedExtensions ( $allowedExtensions)
void setMaximumFileSize (int|float $maximumFileSize)
void setRequired ([boolean $flag = true])
void setRequiredCount (int $count)
Variables
iPhorm_Validator_FileUpload $_fileUploadValidator (line 17)

File upload validator

- access: protected

boolean $_skipRender = true (line 10)

Success handlers should skip this element

- access: protected

Redefinition of:

iPhorm_Element::$_skipRender
  Should the element be skipped by success handlers

#### Inherited Variables

Inherited from iPhorm_Element

> iPhorm_Element::$_errors
> iPhorm_Element::$_filters
> iPhorm_Element::$_form
> iPhorm_Element::$_isArray
> iPhorm_Element::$_isMultiple
> iPhorm_Element::$_label
> iPhorm_Element::$_name
> iPhorm_Element::$_validators
> iPhorm_Element::$_value

Methods
Constructor __construct (line 19)

- access: public

iPhorm_Element_File __construct ( $name, [ $label = ''], [ $options = array()])

- $name
- $label
- array $options

Redefinition of:

iPhorm_Element::__construct()

getAllowedExtensions (line 56)

Get the allowed extensions

- return: The array of allowed extensions
- access: public

array getAllowedExtensions ()
getFileUploadValidator (line 129)

Get this elements file upload validator

- access: public

iPhorm_Validator_FileUpload getFileUploadValidator ()
getMaximumFileSize (line 79)

Get the maximum allowable file size in bytes

- return: The maximum size
- access: public

int|float getMaximumFileSize ()
getRequired (line 99)

Is this element required?

- access: public

boolean getRequired ()
getRequiredCount (line 119)

Get the number of required uploads

- access: public

int getRequiredCount ()
isValid (line 141)

Is the uploaded file valid?

- return: True if valid, false otherwise
- access: public

boolean isValid (string $value, [array $context = null])

- string $value: The value to check
- array $context: The other submitted form values

Redefinition of:

iPhorm_Element::isValid()
  Is the given value valid?

setAllowedExtensions (line 46)

Set the allowed extensions

- access: public

void setAllowedExtensions ( $allowedExtensions)

- array $allowedExtensions

setMaximumFileSize (line 69)

Set the maximum allowable file size in bytes

Default is 10MB (10485760 bytes) Set to 0 for no limit

- access: public

void setMaximumFileSize (int|float $maximumFileSize)

- int|float $maximumFileSize

setRequired (line 89)

Set if the element is required

- access: public

void setRequired ([boolean $flag = true])

- boolean $flag

Redefinition of:

iPhorm_Element::setRequired()
  Sets whether the element is required or not

setRequiredCount (line 109)

Set the number of required uploads for a multiple upload element

- access: public

void setRequiredCount (int $count)

- int $count

#### Inherited Methods

Inherited From iPhorm_Element

> iPhorm_Element::__construct()
> iPhorm_Element::addFilter()
> iPhorm_Element::addFilters()
> iPhorm_Element::addValidator()
> iPhorm_Element::addValidators()
> iPhorm_Element::clearFilters()
> iPhorm_Element::clearValidators()
> iPhorm_Element::getErrors()
> iPhorm_Element::getFilter()
> iPhorm_Element::getFilters()
> iPhorm_Element::getForm()
> iPhorm_Element::getFullyQualifiedName()
> iPhorm_Element::getIsArray()
> iPhorm_Element::getIsMultiple()
> iPhorm_Element::getLabel()
> iPhorm_Element::getName()
> iPhorm_Element::getSkipRender()
> iPhorm_Element::getValidator()
> iPhorm_Element::getValidators()
> iPhorm_Element::getValue()
> iPhorm_Element::getValueUnfiltered()
> iPhorm_Element::hasErrors()
> iPhorm_Element::hasFilter()
> iPhorm_Element::hasFilters()
> iPhorm_Element::hasValidator()
> iPhorm_Element::hasValidators()
> iPhorm_Element::isValid()
> iPhorm_Element::removeFilter()
> iPhorm_Element::removeValidator()
> iPhorm_Element::setFilters()
> iPhorm_Element::setForm()
> iPhorm_Element::setIsArray()
> iPhorm_Element::setIsMultiple()
> iPhorm_Element::setLabel()
> iPhorm_Element::setName()
> iPhorm_Element::setRequired()
> iPhorm_Element::setSkipRender()
> iPhorm_Element::setValidators()
> iPhorm_Element::setValue()
> iPhorm_Element::_filterValue()
> iPhorm_Element::_filterValueRecursive()
> iPhorm_Element::_loadFilter()
> iPhorm_Element::_loadValidator()
> iPhorm_Element::_prettyName()

Documentation generated on Thu, 24 Feb 2011 22:19:37 +0000 by phpDocumentor 1.4.3