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 2648 2009-05-10 10:51:52Z godzilla80@gmx.net $
  • author: Wei Zhuo <weizho[at]gmail[dot]com>

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

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

Define the way an active record finder react if an invalid magic-finder invoked

void setInvalidFinderResult (TActiveRecordInvalidFinderResult $value)

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 Sun, 24 May 2009 16:40:58 -0400 by phpDocumentor 1.3.0RC4