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 .
저자: OpenEyes ([email protected])
상속: extends CActiveRecord
파일 보기 프로젝트 열기: openeyes/openeyes

공개 프로퍼티들

프로퍼티 타입 설명
$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'.
public connectionId ( ) : string
리턴 string

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.
public tableName ( ) : string
리턴 string name of the class table

프로퍼티 상세

$db 공개적으로 정적으로 프로퍼티

the default database connection for all active record classes. By default, this is the 'db' application component.
또한 보기: getDbConnection
public static $db