PHP Class bubasuma\simplechat\db\Message

Since: 1.0
Author: Buba Suma ([email protected])
Inheritance: extends yii\db\ActiveRecord
Datei anzeigen Open project: bubasuma/yii2-simplechat Class Usage Examples

Public Methods

Method Description
create ( integer $userId, integer $contactId, string $text ) : array | boolean
find ( ) : MessageQuery
get ( integer $userId, integer $contactId, integer $limit, boolean $history = true, integer $key = null ) : DataProvider
rules ( )
tableName ( )

Protected Methods

Method Description
baseQuery ( integer $userId, integer $contactId ) : MessageQuery

Method Details

baseQuery() protected static method

protected static baseQuery ( integer $userId, integer $contactId ) : MessageQuery
$userId integer
$contactId integer
return MessageQuery

create() public static method

public static create ( integer $userId, integer $contactId, string $text ) : array | boolean
$userId integer
$contactId integer
$text string
return array | boolean returns true on success or errors if validation fails

find() public static method

public static find ( ) : MessageQuery
return MessageQuery

get() public static method

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

rules() public method

public rules ( )

tableName() public static method

public static tableName ( )