Moodle  2.2.1
http://www.collinsharper.com
Zend_Validate_File_Exists Class Reference
Inheritance diagram for Zend_Validate_File_Exists:
Collaboration diagram for Zend_Validate_File_Exists:

Public Member Functions

 __construct ($directory=array())
 getDirectory ($asArray=false)
 setDirectory ($directory)
 addDirectory ($directory)
 isValid ($value, $file=null)

Data Fields

const DOES_NOT_EXIST = 'fileExistsDoesNotExist'

Protected Member Functions

 _throw ($file, $errorType)

Protected Attributes

 $_messageTemplates
 $_directory = ''
 $_messageVariables

Detailed Description

Definition at line 35 of file Exists.php.


Constructor & Destructor Documentation

__construct ( directory = array())

Sets validator options

Parameters:
string | array | Zend_Config$directory
Returns:
void

Definition at line 68 of file Exists.php.

Here is the call graph for this function:


Member Function Documentation

_throw ( file,
errorType 
) [protected]

Throws an error of the given type

Parameters:
string$file
string$errorType
Returns:
false

Definition at line 194 of file Exists.php.

Here is the call graph for this function:

Here is the caller graph for this function:

addDirectory ( directory)

Adds the file directory which will be checked

Parameters:
string | array$directoryThe directory to add for validation
Returns:
Zend_Validate_File_Extension Provides a fluent interface

Definition at line 118 of file Exists.php.

Here is the call graph for this function:

Here is the caller graph for this function:

getDirectory ( asArray = false)

Returns the set file directories which are checked

Parameters:
boolean$asArrayReturns the values as array, when false an concated string is returned
Returns:
string

Definition at line 88 of file Exists.php.

Here is the caller graph for this function:

isValid ( value,
file = null 
)

Defined by Zend_Validate_Interface

Returns true if and only if the file already exists in the set directories

Parameters:
string$valueReal file to check for existance
array$fileFile data from Zend_File_Transfer
Returns:
boolean

Reimplemented in Zend_Validate_File_NotExists.

Definition at line 159 of file Exists.php.

Here is the call graph for this function:

setDirectory ( directory)

Sets the file directory which will be checked

Parameters:
string | array$directoryThe directories to validate
Returns:
Zend_Validate_File_Extension Provides a fluent interface

Definition at line 105 of file Exists.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$_directory = '' [protected]

Definition at line 53 of file Exists.php.

$_messageTemplates [protected]
Initial value:
 array(
        self::DOES_NOT_EXIST => "File '%value%' does not exist",
    )

Reimplemented from Zend_Validate_Abstract.

Reimplemented in Zend_Validate_File_NotExists.

Definition at line 45 of file Exists.php.

$_messageVariables [protected]
Initial value:
 array(
        'directory' => '_directory'
    )

Reimplemented from Zend_Validate_Abstract.

Definition at line 58 of file Exists.php.

const DOES_NOT_EXIST = 'fileExistsDoesNotExist'

string Error constants

Definition at line 40 of file Exists.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations