* public function __construct( array $params ); * * * The structure of the parameters is array( 'parameter_name' => 'parameter_value' ). * * @package PersistentObject * @access private */ interface ezcPersistentIdentifierGenerator { /** * Called prior to executing the insert query that saves the data to the database. * * All the data has been set on the query prior to calling this method. * * @param ezcPersistentObjectDefinition $def * @param ezcDbHandler $db * @param ezcQueryInsert $q * @return void */ public function preSave( ezcPersistentObjectDefinition $def, ezcDbHandler $db, ezcQueryInsert $q ); /** * Returns the integer value of the generated identifier for the new object. * * Called right after execution of the insert query. * Returns null if it was not possible to generate a new ID. * * @param ezcPersistentObjectDefinition $def * @param ezcDbHandler $db * @return int */ public function postSave( ezcPersistentObjectDefinition $def, ezcDbHandler $db ); } ?>