Class TActiveRecordManager

Description

TActiveRecordManager provides the default DB connection, default active record gateway, and table meta data inspector.

The default connection can be set as follows:

  1. 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
  • version: $Id: TActiveRecordManager.php 2329 2007-11-01 04:20:14Z wei $
  • author: Wei Zhuo <weizho[at]gmail[dot]com>

Located in /Data/ActiveRecord/TActiveRecordManager.php (line 38)

TComponent
   |
   --TActiveRecordManager
Method Summary
Methods
createRecordGateway (line 104)
  • return: default record gateway.
  • access: protected
TActiveRecordGateway createRecordGateway ()
getCache (line 49)
  • return: application cache.
  • access: public
ICache getCache ()
getDbConnection (line 73)
  • return: default database connection
  • access: public
TDbConnection getDbConnection ()
getInstance (line 81)
  • return: static instance of record manager.
  • static:
  • access: public
TActiveRecordManager getInstance ([mixed $self = null])
getRecordGateway (line 94)
  • return: record gateway.
  • access: public
TActiveRecordGateway getRecordGateway ()
setCache (line 57)
  • access: public
void setCache (ICache $value)
  • ICache $value: application cache
setDbConnection (line 65)
  • access: public
void setDbConnection (TDbConnection $conn)

Inherited 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()

Documentation generated on Mon, 21 Apr 2008 11:29:54 -0400 by phpDocumentor 1.3.0RC4