This identifier generator does not generate any ID's. Instead the user must manually assign an ID when the object is saved.
This is useful don't want any automatic id generation.
Source for this file: /PersistentObject/src/generators/manual_generator.php
ezcPersistentIdentifierGenerator | --ezcPersistentManualGenerator
Version: | //autogen// |
public void |
checkPersistence(
$def
, $db
, $state
)
Returns true if the object is persistent already. |
public int |
postSave(
$def
, $db
)
Returns the value of the generated identifier for the new object. |
public void |
preSave(
$def
, $db
, $q
)
Sets the correct id on the insert query. |
From ezcPersistentIdentifierGenerator | |
---|---|
public bool |
ezcPersistentIdentifierGenerator::checkPersistence()
Returns true if the object is persistent already. |
public abstract int |
ezcPersistentIdentifierGenerator::postSave()
Returns the value of the generated identifier for the new object. |
public abstract void |
ezcPersistentIdentifierGenerator::preSave()
Called prior to executing the insert query that saves the data to the database. |
Returns true if the object is persistent already.
Called in the beginning of the save process.
Persistent objects that are being saved must not exist in the database already.
Name | Type | Description |
---|---|---|
$def |
ezcPersistentObjectDefinition | |
$db |
ezcDbHandler | |
$state |
array(key=>value) |
Method | Description |
---|---|
ezcPersistentIdentifierGenerator::checkPersistence() |
Returns true if the object is persistent already. |
Returns the value of the generated identifier for the new object.
Called right after execution of the insert query.
Name | Type | Description |
---|---|---|
$def |
ezcPersistentObjectDefinition | |
$db |
ezcDbHandler |
Method | Description |
---|---|
ezcPersistentIdentifierGenerator::postSave() |
Returns the value of the generated identifier for the new object. |
Sets the correct id on the insert query.
Name | Type | Description |
---|---|---|
$def |
ezcPersistentObjectDefinition | |
$db |
ezcDbHandler | |
$q |
ezcQueryInsert |
Method | Description |
---|---|
ezcPersistentIdentifierGenerator::preSave() |
Called prior to executing the insert query that saves the data to the database. |