예제 #1
0
 /**
  * Посылает сообщение всем авторизованным пользователям
  * @param $message
  */
 public function actionGlobal($message)
 {
     SE::emit('global', null, ['handler' => 'alert', 'data' => $message]);
 }
예제 #2
0
 public function init()
 {
     if (!isset(\Yii::$app->components['se'])) {
         throw new InvalidConfigException('Yii::$app->se is not configured');
     }
     $this->se = \Yii::$app->se;
     if (empty($this->object)) {
         throw new InvalidConfigException('Object field can not be empty');
     }
     $this->qkey = SE::genQKey($this->object, $this->id);
 }