ModelDatabase

Filepath: phork/php/ext/helpers/ModelDatabase.class.php

The ModelDatabase helper is used in conjunction with the DatabaseManager to change the database before loading, saving and deleting records, and to change it back afterwards.


Example

AppLoader::includeExtension('helpers/', 'ModelDatabase')
$objModel->appendHelper('database', 'ModelDatabase');
$objModel->initHelper('database', array('preLoad', 'preSave', 'preDelete'), array(
    'Database' => 'foo'
));
...
$objModel->destroyHelper('database');