FreenetIS
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Variable_Key_Generator Class Reference

Abstract class for variable key drivers. More...

Inheritance diagram for Variable_Key_Generator:
Checksum_Variable_Key_Generator Member_Id_Variable_Key_Generator Pvfree_Variable_Key_Generator

Public Member Functions

 generate ($identificator)
 Generated variable key from given identificator.
 errorCheckAvailable ()
 Is generator capable of error checking.
 errorCheck ($var_key)
 If errorCheckAvailable() is TRUE that this method may be used for error detection.
 errorCorrectionAvailable ()
 Is generator capable of error correction.
 errorCorrection ($var_key)
 If errorCorrectionAvaiable() is TRUE than this method may be used for error correction of the variable symbol.

Static Public Member Functions

static factory ($driver=NULL)
 Factory for Variable key drivers.
static get_driver_name ($driver)
 Gets name of driver.
static get_drivers ()
 Gets drivers array.
static get_drivers_for_dropdown ()
 Gets drivers array for dropdown.
static get_active_driver ()
 Gets list of active drivers for selectboxes.

Public Attributes

const DIR = 'variable_key_generators'
 Dir with classes.

Detailed Description

Abstract class for variable key drivers.

Author
Ondrej Fibich
See Also
Bank_Statement_File_Importer

Member Function Documentation

Variable_Key_Generator::errorCheck (   $var_key)

If errorCheckAvailable() is TRUE that this method may be used for error detection.

It is only capable of detection, no correction is available here.

Override this method in a subclass in order to implement error detection for your generator.

Parameters
string$var_keyVariable key
Returns
boolean TRUE is the given variable key is without errors or FALSE otherwise

Reimplemented in Checksum_Variable_Key_Generator, and Pvfree_Variable_Key_Generator.

Variable_Key_Generator::errorCheckAvailable ( )
abstract

Is generator capable of error checking.

Returns
boolean

Reimplemented in Checksum_Variable_Key_Generator, Pvfree_Variable_Key_Generator, and Member_Id_Variable_Key_Generator.

Variable_Key_Generator::errorCorrection (   $var_key)

If errorCorrectionAvaiable() is TRUE than this method may be used for error correction of the variable symbol.

Override this method in a subclass in order to implement error correction for your generator.

Parameters
string$var_keyVariable key
Returns
array Contains two items boolean status TRUE if correction was successful FALSE if correction was unsuccessful string corrected_variable_key Corrected variable symbol

Reimplemented in Checksum_Variable_Key_Generator.

Variable_Key_Generator::errorCorrectionAvailable ( )
abstract

Is generator capable of error correction.

Returns
boolean

Reimplemented in Checksum_Variable_Key_Generator, Pvfree_Variable_Key_Generator, and Member_Id_Variable_Key_Generator.

static Variable_Key_Generator::factory (   $driver = NULL)
static

Factory for Variable key drivers.

Parameters
mixed$driverString index of driver or integer ID of driver or NUL if current should be selected.
Returns
Variable_Key_Generator Generator instance or NULL if driver name or ID is incorect.
Variable_Key_Generator::generate (   $identificator)
abstract

Generated variable key from given identificator.

Parameters
mixed$identificatorIndentificator for generate from
Returns
integer Variable key

Reimplemented in Checksum_Variable_Key_Generator, Member_Id_Variable_Key_Generator, and Pvfree_Variable_Key_Generator.

static Variable_Key_Generator::get_active_driver ( )
static

Gets list of active drivers for selectboxes.

Key is id of driver and value is name.

Returns
string ID of driver
static Variable_Key_Generator::get_driver_name (   $driver)
static

Gets name of driver.

Parameters
integer$driverString index of driver or integer ID of driver.
Returns
string
static Variable_Key_Generator::get_drivers ( )
static

Gets drivers array.

Returns
array
static Variable_Key_Generator::get_drivers_for_dropdown ( )
static

Gets drivers array for dropdown.

Returns
array

The documentation for this class was generated from the following file: