- Home
- About
- Testimonials
- Demos
- Download
- Documentation
- Blogs
- Forum
- Support

Packages: default System System.Caching System.Collections System.Data System.Data.ActiveRecord System.Data.ActiveRecord.Relations System.Data.ActiveRecord.Scaffold System.Data.ActiveReecord.Scaffold.InputBuilder System.Data.Commom.Sqlite System.Data.Common System.Data.Common.Mssql System.Data.Common.Mysql System.Data.Common.Oracle System.Data.Common.Pgsql System.Data.Common.Sqlite System.Data.DataGateway System.Data.SqlMap System.Data.SqlMap.Configuration System.Data.SqlMap.Statements System.Exceptions System.I18N System.IO System.Security System.Util System.Web System.Web.Services System.Web.UI System.Web.UI.ActiveControls System.Web.UI.WebControls System.Web.UI.WebControls.assets System.Xml Classes: TActiveRecord TActiveRecordChangeEventParameter TActiveRecordConfig TActiveRecordConfigurationException TActiveRecordCriteria TActiveRecordException TActiveRecordGateway TActiveRecordInvalidFinderResult TActiveRecordManager |
Keyword
# Class TActiveRecordManager
    TComponent
       |
       --TActiveRecordManager
TActiveRecordManager provides the default DB connection, default active record gateway, and table meta data inspector. The default connection can be set as follows:

     TActiveRecordManager::getInstance()->setDbConnection($conn);
All new active record created after setting the DbConnection will use that connection unless the custom ActiveRecord class overrides the ActiveRecord::getDbConnection(). Set the Cache property to an ICache object to allow the active record gateway to cache the table meta data information. Since: 3.1 Author: Wei Zhuo <weizho[at]gmail[dot]com>
Method Summary
protected TActiveRecordGateway | createRecordGateway ()
ICache | getCache ()
TDbConnection | getDbConnection ()
TActiveRecordManager | getInstance ( mixed $self)
TActiveRecordInvalidFinderResult | getInvalidFinderResult ()
TActiveRecordGateway | getRecordGateway ()
void | setCache ( ICache $value)
void | setDbConnection ( TDbConnection $conn)
void | setInvalidFinderResult ( TActiveRecordInvalidFinderResult $value) Define the way an active record finder react if an invalid magic-finder invoked
Methods 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()
Method Details
## createRecordGateway
protected TActiveRecordGateway createRecordGateway | ()
Output
TActiveRecordGateway | default record gateway.
Exception
## getCache
public ICache getCache | ()
Output
ICache | application cache.
Exception
## getDbConnection
public TDbConnection getDbConnection | ()
Output
TDbConnection | default database connection
Exception
## getInstance
public TActiveRecordManager getInstance | (mixed $self )
Input
mixed | $self |
Output
TActiveRecordManager | static instance of record manager.
Exception
## getInvalidFinderResult
public TActiveRecordInvalidFinderResult getInvalidFinderResult | ()
Output
TActiveRecordInvalidFinderResult | Defaults to 'Null'.
Exception
## getRecordGateway
public TActiveRecordGateway getRecordGateway | ()
Output
TActiveRecordGateway | record gateway.
Exception
## setCache
public void setCache | (ICache $value )
Input
ICache | $value | application cache
Output
Exception
## setDbConnection
public void setDbConnection | (TDbConnection $conn )
Input
TDbConnection | $conn | default database connection
Output
Exception
## setInvalidFinderResult
public void setInvalidFinderResult | (TActiveRecordInvalidFinderResult $value )
Define the way an active record finder react if an invalid magic-finder invoked
Input
TActiveRecordInvalidFinderResult | $value |
Output
Exception