TActiveRecordManager provides the default DB connection, default object state registry, default active record gateway, and table meta data inspector.
You can provide a different registry by overriding the createObjectStateRegistry() method. Similarly, override createRecordGateway() for default gateway and override createMetaDataInspector()for meta data inspector.
The default connection can be set as follows:
All new active record created after setting the DbConnection will use that connection.
- TActiveRecordManager::getInstance()->setDbConnection($conn);
The onInsert(), onUpdate(), onDelete() and onSelect() events are raised before their respective command are executed.
Located in /Data/ActiveRecord/TActiveRecordManager.php (line 43)
TComponent | --TActiveRecordManager
Create an instance of a database meta inspector corresponding to the given database vendor specified by the $driver parameter.
Get table meta data for particular database and table.
This method is invoked before the object is deleted from the database.
The method raises 'OnDelete' event. If you override this method, be sure to call the parent implementation so that the event handlers can be invoked.
This method is invoked before the object is inserted into the database.
The method raises 'OnInsert' event. If you override this method, be sure to call the parent implementation so that the event handlers can be invoked.
This method is invoked before any select query is executed on the database.
The method raises 'OnSelect' event. If you override this method, be sure to call the parent implementation so that the event handlers can be invoked.
This method is invoked before the object data is updated in the database.
The method raises 'OnUpdate' event. If you override this method, be sure to call the parent implementation so that the event handlers can be invoked.
Inherited From TComponent
TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
Documentation generated on Sun, 14 Jan 2007 21:41:01 -0500 by phpDocumentor 1.3.0RC4