PHP Class MultiActiveRecord

(C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2011 (C) OpenEyes Foundation, 2011-2013 This file is part of OpenEyes. OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see .
Author: OpenEyes ([email protected])
Inheritance: extends CActiveRecord
Afficher le fichier Open project: openeyes/openeyes

Méthodes publiques

Свойство Type Description
$db the default database connection for all active record classes. By default, this is the 'db' application component.

Méthodes publiques

Méthode Description
connectionId ( ) : string define which connection to use in the model, default to 'db'.
getDbConnection ( ) : CDbConnection Returns the database connection used by active record.
model ( string $className = __CLASS__ ) : CModel workaround to try the model's name, if not given doesnt always work, and thats the reason its not included in the framework's core.
tableName ( ) : string try to guess the model's name, models should override this function to improve speed and better customization it does the inverse process of gii's model creator.

Method Details

connectionId() public méthode

define which connection to use in the model, default to 'db'.
public connectionId ( ) : string
Résultat string

getDbConnection() public méthode

By default, the "db" application component is used as the database connection. If you override the method connectionId it will use this connection.
public getDbConnection ( ) : CDbConnection
Résultat CDbConnection the database connection used by active record.

model() public static méthode

workaround to try the model's name, if not given doesnt always work, and thats the reason its not included in the framework's core.
public static model ( string $className = __CLASS__ ) : CModel
$className string
Résultat CModel

tableName() public méthode

try to guess the model's name, models should override this function to improve speed and better customization it does the inverse process of gii's model creator.
public tableName ( ) : string
Résultat string name of the class table

Property Details

$db public_oe static_oe property

the default database connection for all active record classes. By default, this is the 'db' application component.
See also: getDbConnection
public static $db