CORE POS - Fannie
The CORE POS back end
Public Member Functions | Protected Attributes | List of all members
COREPOS\Fannie\API\data\hooks\BasicModelHook Class Reference
Inheritance diagram for COREPOS\Fannie\API\data\hooks\BasicModelHook:
BasicModelHook

Public Member Functions

 operatesOnTable ($table_name)
 
 onSave ($table_name, $model_obj)
 

Protected Attributes

 $registered_tables = array()
 

Detailed Description

Base class to attach actions to models

Member Function Documentation

COREPOS\Fannie\API\data\hooks\BasicModelHook::onSave (   $table_name,
  $model_obj 
)

Save callback This method is called before a model is saved to the database.

Parameters
$table_name[string] is the name of the table represented by the model. Only useful if a hook interacts with multiple tables
$model_obj[object] instance of the model
Returns
[none]
COREPOS\Fannie\API\data\hooks\BasicModelHook::operatesOnTable (   $table_name)

Does hook class operate on the given table

Parameters
$table_name[string]
Returns
[boolean]

Member Data Documentation

COREPOS\Fannie\API\data\hooks\BasicModelHook::$registered_tables = array()
protected

List of [string] table names the hook class needs access to


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