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
.
Datei anzeigen
Open project: openeyes/openeyes
Public Properties
Property |
Type |
Description |
|
$db |
|
the default database connection for all active record classes.
By default, this is the 'db' application component. |
|
Public Methods
Method |
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 method
define which connection to use in the model, default to 'db'.
getDbConnection()
public method
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 |
return |
CDbConnection |
the database connection used by active record. |
model()
public static method
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 |
|
return |
CModel |
|
tableName()
public method
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.
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.