ALL and SESSION constants for push

This commit is contained in:
Ralf Becker 2020-01-23 16:05:32 +01:00
parent 6e0936bd98
commit 2bae92f066

View File

@ -40,12 +40,21 @@ class Push extends Msg
*/
protected $account_id;
/**
* Push to all clients / broadcast
*/
const ALL = 0;
/**
* Push to current session
*/
const SESSION = null;
/**
*
* @param int $account_id =null account_id to push message too or
* null: for current session only or 0 for whole instance / broadcast
* self::SESSION(=null): for current session only or self::ALL(=0) for whole instance / broadcast
*/
public function __construct($account_id=null)
public function __construct($account_id=self::SESSION)
{
$this->account_id = $account_id;
}