Refactored for events system

This commit is contained in:
CyanoFresh
2017-09-01 18:22:12 +03:00
parent 589e653301
commit 7da63c5685
24 changed files with 870 additions and 31 deletions

View File

@@ -0,0 +1,44 @@
<?php
namespace app\modules\customModule;
use app\modules\BaseModule;
use app\modules\server\components\CoreServer;
/**
* customModule module definition class
*/
class Module extends BaseModule
{
/**
* @inheritdoc
*/
public $controllerNamespace = 'app\modules\customModule\controllers';
/**
* @inheritdoc
*/
public function init()
{
parent::init();
}
/**
* @inheritdoc
*/
public static function getEventHandlers()
{
return [
[
CoreServer::EVENT_INIT,
/** @see EventHandler::onServerInit() */
[EventHandler::class, 'onServerInit']
],
[
CoreServer::EVENT_CONNECTION_MESSAGE,
/** @see EventHandler::onConnectionOpen() */
[EventHandler::class, 'onMessage']
],
];
}
}