PHP Класс 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
.
Показать файл
Открыть проект
Открытые свойства
Свойство |
Тип |
Описание |
|
$db |
|
the default database connection for all active record classes.
By default, this is the 'db' application component. |
|
Открытые методы
Метод |
Описание |
|
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. |
|
Описание методов
connectionId()
публичный Метод
define which connection to use in the model, default to 'db'.
getDbConnection()
публичный Метод
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 |
Результат |
CDbConnection |
the database connection used by active record. |
model()
публичный статический Метод
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 |
|
Результат |
CModel |
|
tableName()
публичный Метод
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.
Описание свойств
$db публичное статическое свойство
the default database connection for all active record classes.
By default, this is the 'db' application component.