PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class 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 setDbConnection() will use that connection unless the custom ActiveRecord class overrides the ActiveRecord::getDbConnection().

Set the setCache Cache property to an ICache object to allow the active record gateway to cache the table meta data information.

TComponent
Extended by TActiveRecordManager
Package: System\Data\ActiveRecord
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Wei Zhuo <weizho[at]gmail[dot]com>
Since: 3.1
Located at Data/ActiveRecord/TActiveRecordManager.php
Methods summary
public ICache
# getCache( )

Returns

ICache
application cache.
public
# setCache( ICache $value )

Parameters

$value
ICache
application cache
public
# setDbConnection( TDbConnection $conn )

Parameters

$conn
TDbConnection
default database connection
public TDbConnection
# getDbConnection( )

Returns

TDbConnection
default database connection
public static TActiveRecordManager
# getInstance( mixed $self = null )

Returns

TActiveRecordManager
static instance of record manager.
public TActiveRecordGateway
# getRecordGateway( )

Returns

TActiveRecordGateway
record gateway.
protected TActiveRecordGateway
# createRecordGateway( )

Returns

TActiveRecordGateway
default record gateway.
public
# setGatewayClass( string $value )

Set implementation class of ActiveRecordGateway

Set implementation class of ActiveRecordGateway

Parameters

$value
string
$value
public string
# getGatewayClass( )

Returns

string
the implementation class of ActiveRecordGateway. Defaults to TActiveRecordManager::DEFAULT_GATEWAY_CLASS DEFAULT_GATEWAY_CLASS
public TActiveRecordInvalidFinderResult
# getInvalidFinderResult( )

Returns

TActiveRecordInvalidFinderResult
Defaults to 'TActiveRecordInvalidFinderResult::Null Null'.

Since

3.1.5

See

TActiveRecordManager::setInvalidFinderResult()
public
# setInvalidFinderResult( TActiveRecordInvalidFinderResult $value )

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

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

Parameters

$value
TActiveRecordInvalidFinderResult

Since

3.1.5

See

TActiveRecordManager::getInvalidFinderResult()
Methods inherited from TComponent
__call(), __construct(), __destruct(), __get(), __isset(), __set(), __sleep(), __unset(), __wakeup(), addParsedObject(), asa(), attachBehavior(), attachBehaviors(), attachClassBehavior(), attachEventHandler(), canGetProperty(), canSetProperty(), clearBehaviors(), createdOnTemplate(), detachBehavior(), detachBehaviors(), detachClassBehavior(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), evaluateStatements(), fxAttachClassBehavior(), fxDetachClassBehavior(), getAutoGlobalListen(), getBehaviorsEnabled(), getClassHierarchy(), getEventHandlers(), getListeningToGlobalEvents(), getSubProperty(), hasEvent(), hasEventHandler(), hasProperty(), isa(), listen(), raiseEvent(), setSubProperty(), unlisten()
Constants summary
string DEFAULT_GATEWAY_CLASS 'System.Data.ActiveRecord.TActiveRecordGateway'
#
Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO