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

Public Member Functions

 __construct ($options=array())
 isValid ($value)
 setSeparator ($separator)
 getSeparator ()
 setType ($type)
 getType ()

Data Fields

const AUTO = 'auto'
const ISBN10 = '10'
const ISBN13 = '13'
const INVALID = 'isbnInvalid'
const NO_ISBN = 'isbnNoIsbn'

Protected Member Functions

 _detectFormat ()

Protected Attributes

 $_messageTemplates
 $_type = self::AUTO
 $_separator = ''

Detailed Description

Definition at line 33 of file Isbn.php.


Constructor & Destructor Documentation

__construct ( options = array())

Set up options.

Parameters:
Zend_Config | array$options
Exceptions:
Zend_Validate_ExceptionWhen $options is not valid
Returns:
void
See also:
Zend_Validate_Exception

Definition at line 72 of file Isbn.php.

Here is the call graph for this function:


Member Function Documentation

_detectFormat ( ) [protected]

Detect input format.

Returns:
string

Definition at line 102 of file Isbn.php.

Here is the caller graph for this function:

Get separator characters.

Returns:
string

Definition at line 243 of file Isbn.php.

getType ( )

Get allowed ISBN type.

Returns:
string

Definition at line 275 of file Isbn.php.

isValid ( value)

Defined by Zend_Validate_Interface.

Returns true if and only if $value is a valid ISBN.

Parameters:
string$value
Returns:
boolean

Implements Zend_Validate_Interface.

Definition at line 155 of file Isbn.php.

Here is the call graph for this function:

setSeparator ( separator)

Set separator characters.

It is allowed only empty string, hyphen and space.

Parameters:
string$separator
Exceptions:
Zend_Validate_ExceptionWhen $separator is not valid
Returns:
Zend_Validate_Isbn Provides a fluent interface
See also:
Zend_Validate_Exception

Definition at line 223 of file Isbn.php.

Here is the caller graph for this function:

setType ( type)

Set allowed ISBN type.

Parameters:
string$type
Exceptions:
Zend_Validate_ExceptionWhen $type is not valid
Returns:
Zend_Validate_Isbn Provides a fluent interface
See also:
Zend_Validate_Exception

Definition at line 255 of file Isbn.php.

Here is the caller graph for this function:


Field Documentation

$_messageTemplates [protected]
Initial value:
 array(
        self::INVALID => "Invalid type given, value should be string or integer",
        self::NO_ISBN => "'%value%' is no valid ISBN number",
    )

Reimplemented from Zend_Validate_Abstract.

Definition at line 46 of file Isbn.php.

$_separator = '' [protected]

Definition at line 63 of file Isbn.php.

$_type = self::AUTO [protected]

Definition at line 56 of file Isbn.php.

const AUTO = 'auto'

Definition at line 35 of file Isbn.php.

const INVALID = 'isbnInvalid'

Definition at line 38 of file Isbn.php.

const ISBN10 = '10'

Definition at line 36 of file Isbn.php.

const ISBN13 = '13'

Definition at line 37 of file Isbn.php.

const NO_ISBN = 'isbnNoIsbn'

Definition at line 39 of file Isbn.php.


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