|
Moodle
2.2.1
http://www.collinsharper.com
|


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 | |
Definition at line 38 of file Barcode.php.
| __construct | ( | $ | adapter | ) |
Generates the standard validator object
| string|Zend_Config| | Zend_Validate_Barcode_BarcodeAdapter $adapter Barcode adapter to use |
| Zend_Validate_Exception |
Definition at line 83 of file Barcode.php.

| getAdapter | ( | ) |
Returns the set adapter
Definition at line 119 of file Barcode.php.

| getChecksum | ( | ) |
Returns the checksum option
Definition at line 160 of file Barcode.php.


| isValid | ( | $ | value | ) |
Defined by Zend_Validate_Interface
Returns true if and only if $value contains a valid barcode
| string | $value |
Implements Zend_Validate_Interface.
Definition at line 185 of file Barcode.php.

| setAdapter | ( | $ | adapter, |
| $ | options = null |
||
| ) |
Sets a new barcode adapter
| string | Zend_Validate_Barcode | $adapter | Barcode adapter to use |
| array | $options | Options for this adapter |
| Zend_Validate_Exception |
Definition at line 132 of file Barcode.php.


| setChecksum | ( | $ | checksum | ) |
Sets the checksum option
| boolean | $checksum |
Definition at line 171 of file Barcode.php.


$_adapter [protected] |
Definition at line 73 of file Barcode.php.
$_length [protected] |
Definition at line 66 of file Barcode.php.
$_messageTemplates [protected] |
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] |
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.