API Documentation

Validate/File/Exists.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Validate
version
$Id: Exists.php 20358 2010-01-17 19:03:49Z thomas $
Classes
Zend_Validate_File_Exists

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Validate_File_Exists

Extends from
Zend_Validate_Abstract
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Validate
Constants
DOES_NOT_EXIST
Properties
$_messageTemplates
$_directory
$_messageVariables
Methods
__construct
getDirectory
setDirectory
addDirectory
isValid
_throw

Description

Validator which checks if the file already exists in the directory

Constants

DOES_NOT_EXIST

 DOES_NOT_EXIST = 'fileExistsDoesNotExist'

Details

value
fileExistsDoesNotExist
const
string Error constants

Properties

$_directory

string $_directory = ''

Internal list of directories

Details

$_directory
string
visibility
protected
default
final
false
static
false

$_messageTemplates

array $_messageTemplates = 'array'

Details

$_messageTemplates
array
Error message templates
visibility
protected
default
array
final
false
static
false

$_messageVariables

array $_messageVariables = 'array'

Details

$_messageVariables
array
Error message template variables
visibility
protected
default
array
final
false
static
false

Methods

__construct

__construct( string|array|Zend_Config $directory = array ) : void

Sets validator options

Arguments
$directory
stringarrayZend_Config
Details
visibility
public
final
false
static
false

_throw

_throw( string $file, string $errorType ) : false

Throws an error of the given type

Arguments
$file
string
$errorType
string
Output
false
Details
visibility
protected
final
false
static
false

addDirectory

addDirectory( string|array $directory ) : Zend_Validate_File_Extension

Adds the file directory which will be checked

Arguments
$directory
stringarray
The directory to add for validation
Output
Zend_Validate_File_Extension
Provides a fluent interface
Details
visibility
public
final
false
static
false

getDirectory

getDirectory( boolean $asArray = false ) : string

Returns the set file directories which are checked

Arguments
$asArray
boolean
Returns the values as array, when false an concated string is returned
Output
string
Details
visibility
public
final
false
static
false

isValid

isValid( string $value, array $file = null ) : boolean

Defined by Zend_Validate_Interface

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

Arguments
$value
string
Real file to check for existance
$file
array
File data from Zend_File_Transfer
Output
boolean
Details
visibility
public
final
false
static
false

setDirectory

setDirectory( string|array $directory ) : Zend_Validate_File_Extension

Sets the file directory which will be checked

Arguments
$directory
stringarray
The directories to validate
Output
Zend_Validate_File_Extension
Provides a fluent interface
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.