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

Public Member Functions

 __construct ($adapter)
 getAdapter ()
 setAdapter ($adapter, $options=null)
 getChecksum ()
 setChecksum ($checksum)
 isValid ($value)

Data Fields

const INVALID = 'barcodeInvalid'
const FAILED = 'barcodeFailed'
const INVALID_CHARS = 'barcodeInvalidChars'
const INVALID_LENGTH = 'barcodeInvalidLength'

Protected Attributes

 $_messageTemplates
 $_messageVariables
 $_length
 $_adapter

Detailed Description

Definition at line 38 of file Barcode.php.


Constructor & Destructor Documentation

__construct ( adapter)

Generates the standard validator object

Parameters:
string|Zend_Config|Zend_Validate_Barcode_BarcodeAdapter $adapter Barcode adapter to use
Returns:
void
Exceptions:
Zend_Validate_Exception

Definition at line 83 of file Barcode.php.

Here is the call graph for this function:


Member Function Documentation

Returns the set adapter

Returns:
Zend_Validate_Barcode_BarcodeAdapter

Definition at line 119 of file Barcode.php.

Here is the caller graph for this function:

Returns the checksum option

Returns:
boolean

Definition at line 160 of file Barcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

isValid ( value)

Defined by Zend_Validate_Interface

Returns true if and only if $value contains a valid barcode

Parameters:
string$value
Returns:
boolean

Implements Zend_Validate_Interface.

Definition at line 185 of file Barcode.php.

Here is the call graph for this function:

setAdapter ( adapter,
options = null 
)

Sets a new barcode adapter

Parameters:
string | Zend_Validate_Barcode$adapterBarcode adapter to use
array$optionsOptions for this adapter
Returns:
void
Exceptions:
Zend_Validate_Exception

Definition at line 132 of file Barcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setChecksum ( checksum)

Sets the checksum option

Parameters:
boolean$checksum
Returns:
Zend_Validate_Barcode

Definition at line 171 of file Barcode.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$_adapter [protected]

Definition at line 73 of file Barcode.php.

$_length [protected]

Definition at line 66 of file Barcode.php.

$_messageTemplates [protected]
Initial value:
 array(
        self::FAILED         => "'%value%' failed checksum validation",
        self::INVALID_CHARS  => "'%value%' contains invalid characters",
        self::INVALID_LENGTH => "'%value%' should have a length of %length% characters",
        self::INVALID        => "Invalid type given, value should be string",
    )

Reimplemented from Zend_Validate_Abstract.

Definition at line 45 of file Barcode.php.

$_messageVariables [protected]
Initial value:
 array(
        'length' => '_length'
    )

Reimplemented from Zend_Validate_Abstract.

Definition at line 57 of file Barcode.php.

const FAILED = 'barcodeFailed'

Definition at line 41 of file Barcode.php.

const INVALID = 'barcodeInvalid'

Definition at line 40 of file Barcode.php.

const INVALID_CHARS = 'barcodeInvalidChars'

Definition at line 42 of file Barcode.php.

const INVALID_LENGTH = 'barcodeInvalidLength'

Definition at line 43 of file Barcode.php.


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