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

Public Member Functions

 __construct ($options=array())
 getMin ()
 setMin ($min)
 getMax ()
 setMax ($max)
 getEncoding ()
 setEncoding ($encoding=null)
 isValid ($value)

Data Fields

const INVALID = 'stringLengthInvalid'
const TOO_SHORT = 'stringLengthTooShort'
const TOO_LONG = 'stringLengthTooLong'

Protected Attributes

 $_messageTemplates
 $_messageVariables
 $_min
 $_max
 $_encoding

Detailed Description

Definition at line 33 of file StringLength.php.


Constructor & Destructor Documentation

__construct ( options = array())

Sets validator options

Parameters:
integer | array | Zend_Config$options
Returns:
void

Definition at line 85 of file StringLength.php.

Here is the call graph for this function:


Member Function Documentation

Returns the actual encoding

Returns:
string

Definition at line 188 of file StringLength.php.

getMax ( )

Returns the max option

Returns:
integer|null

Definition at line 153 of file StringLength.php.

getMin ( )

Returns the min option

Returns:
integer

Definition at line 122 of file StringLength.php.

isValid ( value)

Defined by Zend_Validate_Interface

Returns true if and only if the string length of $value is at least the min option and no greater than the max option (when the max option is not null).

Parameters:
string$value
Returns:
boolean

Implements Zend_Validate_Interface.

Definition at line 225 of file StringLength.php.

Here is the call graph for this function:

setEncoding ( encoding = null)

Sets a new encoding to use

Parameters:
string$encoding
Returns:
Zend_Validate_StringLength

Definition at line 199 of file StringLength.php.

Here is the caller graph for this function:

setMax ( max)

Sets the max option

Parameters:
integer | null$max
Exceptions:
Zend_Validate_Exception
Returns:
Zend_Validate_StringLength Provides a fluent interface
See also:
Zend_Validate_Exception

Definition at line 165 of file StringLength.php.

Here is the caller graph for this function:

setMin ( min)

Sets the min option

Parameters:
integer$min
Exceptions:
Zend_Validate_Exception
Returns:
Zend_Validate_StringLength Provides a fluent interface
See also:
Zend_Validate_Exception

Definition at line 134 of file StringLength.php.

Here is the caller graph for this function:


Field Documentation

$_encoding [protected]

Definition at line 77 of file StringLength.php.

$_max [protected]

Definition at line 70 of file StringLength.php.

$_messageTemplates [protected]
Initial value:
 array(
        self::INVALID   => "Invalid type given, value should be a string",
        self::TOO_SHORT => "'%value%' is less than %min% characters long",
        self::TOO_LONG  => "'%value%' is more than %max% characters long",
    )

Reimplemented from Zend_Validate_Abstract.

Definition at line 42 of file StringLength.php.

$_messageVariables [protected]
Initial value:
 array(
        'min' => '_min',
        'max' => '_max'
    )

Reimplemented from Zend_Validate_Abstract.

Definition at line 51 of file StringLength.php.

$_min [protected]

Definition at line 61 of file StringLength.php.

const INVALID = 'stringLengthInvalid'

Definition at line 35 of file StringLength.php.

const TOO_LONG = 'stringLengthTooLong'

Definition at line 37 of file StringLength.php.

const TOO_SHORT = 'stringLengthTooShort'

Definition at line 36 of file StringLength.php.


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