PHP Class bubasuma\simplechat\db\Conversation

Since: 2.0
Author: Buba Suma ([email protected])
Inheritance: extends yii\db\ActiveRecord
显示文件 Open project: bubasuma/yii2-simplechat Class Usage Examples

Public Methods

Method Description
attributes ( )
beforeDelete ( )
beforeSave ( $insert )
beforeValidate ( )
find ( ) : ConversationQuery
get ( integer $userId, integer $limit, boolean $history = true, integer $key = null ) : DataProvider
getDeleteUrl ( )
getLastMessage ( ) : ActiveQuery
getLoadUrl ( )
getNewMessages ( ) : ActiveQuery
getReadUrl ( )
getSendUrl ( )
getUnreadUrl ( )
populateRecord ( $record, $row )
read ( $userId, $contactId ) : array
recent ( integer $userId ) : static
remove ( string $userId, string $contactId ) : array
tableName ( )
unread ( $userId, $contactId ) : array

Protected Methods

Method Description
baseQuery ( integer $userId ) : ConversationQuery

Method Details

attributes() public method

public attributes ( )

baseQuery() protected static method

protected static baseQuery ( integer $userId ) : ConversationQuery
$userId integer
return ConversationQuery

beforeDelete() public method

public beforeDelete ( )

beforeSave() public method

public beforeSave ( $insert )

beforeValidate() public method

public beforeValidate ( )

find() public static method

public static find ( ) : ConversationQuery
return ConversationQuery

get() public static method

Since: 2.0
public static get ( integer $userId, integer $limit, boolean $history = true, integer $key = null ) : DataProvider
$userId integer
$limit integer
$history boolean
$key integer
return bubasuma\simplechat\DataProvider

getDeleteUrl() public method

public getDeleteUrl ( )

getLastMessage() public method

public getLastMessage ( ) : ActiveQuery
return yii\db\ActiveQuery

getLoadUrl() public method

public getLoadUrl ( )

getNewMessages() public method

public getNewMessages ( ) : ActiveQuery
return yii\db\ActiveQuery

getReadUrl() public method

public getReadUrl ( )

getSendUrl() public method

public getSendUrl ( )

getUnreadUrl() public method

public getUnreadUrl ( )

populateRecord() public static method

public static populateRecord ( $record, $row )

read() public static method

public static read ( $userId, $contactId ) : array
$userId
$contactId
return array the number of rows updated

recent() public static method

public static recent ( integer $userId ) : static
$userId integer
return static

remove() public static method

public static remove ( string $userId, string $contactId ) : array
$userId string
$contactId string
return array the number of rows updated

tableName() public static method

public static tableName ( )

unread() public static method

public static unread ( $userId, $contactId ) : array
$userId
$contactId
return array