PHP Class Zend_Validate_StringLength

Inheritance: extends Zend_Validate_Abstract
Afficher le fichier Open project: kimai/kimai Class Usage Examples

Protected Properties

Свойство Type Description
$_encoding string | null Encoding to use
$_max integer | null If null, there is no maximum length
$_messageTemplates array
$_messageVariables array
$_min integer Minimum length

Méthodes publiques

Méthode Description
__construct ( integer | array | Zend_Config $options = [] ) Sets validator options
getEncoding ( ) : string Returns the actual encoding
getMax ( ) : integer | null Returns the max option
getMin ( ) : integer Returns the min option
isValid ( string $value ) : boolean Defined by Zend_Validate_Interface
setEncoding ( string $encoding = null ) : Zend_Validate_StringLength Sets a new encoding to use
setMax ( integer | null $max ) : Zend_Validate_StringLength Sets the max option
setMin ( integer $min ) : Zend_Validate_StringLength Sets the min option

Method Details

__construct() public méthode

Sets validator options
public __construct ( integer | array | Zend_Config $options = [] )
$options integer | array | Zend_Config

getEncoding() public méthode

Returns the actual encoding
public getEncoding ( ) : string
Résultat string

getMax() public méthode

Returns the max option
public getMax ( ) : integer | null
Résultat integer | null

getMin() public méthode

Returns the min option
public getMin ( ) : integer
Résultat integer

isValid() public méthode

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).
public isValid ( string $value ) : boolean
$value string
Résultat boolean

setEncoding() public méthode

Sets a new encoding to use
public setEncoding ( string $encoding = null ) : Zend_Validate_StringLength
$encoding string
Résultat Zend_Validate_StringLength

setMax() public méthode

Sets the max option
public setMax ( integer | null $max ) : Zend_Validate_StringLength
$max integer | null
Résultat Zend_Validate_StringLength Provides a fluent interface

setMin() public méthode

Sets the min option
public setMin ( integer $min ) : Zend_Validate_StringLength
$min integer
Résultat Zend_Validate_StringLength Provides a fluent interface

Property Details

$_encoding protected_oe property

Encoding to use
protected string|null $_encoding
Résultat string | null

$_max protected_oe property

If null, there is no maximum length
protected int|null $_max
Résultat integer | null

$_messageTemplates protected_oe property

protected array $_messageTemplates
Résultat array

$_messageVariables protected_oe property

protected array $_messageVariables
Résultat array

$_min protected_oe property

Minimum length
protected int $_min
Résultat integer