mirror of
https://github.com/CyanoFresh/SmartHomePHP.git
synced 2026-03-03 16:44:01 +01:00
30 lines
579 B
PHP
30 lines
579 B
PHP
<?php
|
|
|
|
namespace app\modules\server\components;
|
|
|
|
use Ratchet\ConnectionInterface;
|
|
use Ratchet\MessageComponentInterface;
|
|
use React\EventLoop\LoopInterface;
|
|
use Yii;
|
|
use yii\base\Component;
|
|
use yii\base\Event;
|
|
use yii\helpers\Json;
|
|
|
|
abstract class BaseServer extends Component implements MessageComponentInterface
|
|
{
|
|
/**
|
|
* @var LoopInterface
|
|
*/
|
|
public $loop;
|
|
|
|
/**
|
|
* @param string $name
|
|
* @param Event|null $event
|
|
*/
|
|
public function trigger($name, Event $event = null)
|
|
{
|
|
Yii::$app->eventManager->trigger($name, $event);
|
|
}
|
|
|
|
}
|