PHP 클래스 bubasuma\simplechat\Module

The database must contain at less the following two tables: ~~~ CREATE TABLE user ( id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, .. .. ); CREATE TABLE message ( id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, sender_id BIGINT UNSIGNED NOT NULL, receiver_id BIGINT UNSIGNED NOT NULL, text VARCHAR(1000) NOT NULL is_new BOOLEAN DEFAULT 1, is_deleted_by_sender BOOLEAN DEFAULT 0, is_deleted_by_receiver BOOLEAN DEFAULT 0, created_at DATETIME NOT NULL, CONSTRAINT fk_message_sender_id FOREIGN KEY (id) REFERENCES user (id) ON DELETE NO ACTION ON UPDATE CASCADE, CONSTRAINT fk_message_receiver_id FOREIGN KEY (id) REFERENCES user (id) ON DELETE NO ACTION ON UPDATE CASCADE, ); ~~~ The user table stores users, and the message table stores messages
부터: 1.0
저자: Buba Suma ([email protected])
상속: extends yii\base\Module, implements yii\base\BootstrapInterface
파일 보기 프로젝트 열기: bubasuma/yii2-simplechat 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$controllerNamespace
$db the DB connection object or the application component ID of the DB connection.

공개 메소드들

메소드 설명
beforeAction ( $action )
bootstrap ( $app )
init ( ) Initializes simplechat module.

메소드 상세

beforeAction() 공개 메소드

public beforeAction ( $action )

bootstrap() 공개 메소드

public bootstrap ( $app )

init() 공개 메소드

This method will initialize the [[db]] property to make sure it refers to a valid DB connection.
public init ( )

프로퍼티 상세

$controllerNamespace 공개적으로 프로퍼티

public $controllerNamespace

$db 공개적으로 프로퍼티

the DB connection object or the application component ID of the DB connection.
public $db