mirror of
https://github.com/flextype/flextype.git
synced 2025-08-15 01:24:25 +02:00
Flextype Core: using league/event
This commit is contained in:
@@ -102,11 +102,11 @@ class Plugins
|
||||
}
|
||||
}
|
||||
|
||||
Plugins::createPluginsDictionary($plugins_list);
|
||||
$this->createPluginsDictionary($plugins_list);
|
||||
|
||||
Plugins::includeEnabledPlugins($flextype, $app);
|
||||
$this->includeEnabledPlugins($flextype, $app);
|
||||
|
||||
//Event::dispatch('onPluginsInitialized');
|
||||
$this->flextype['emitter']->emit('onPluginsInitialized');
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -22,6 +22,7 @@ use Slim\Http\Request;
|
||||
use Slim\Http\Response;
|
||||
use League\Glide\ServerFactory;
|
||||
use League\Glide\Responses\SlimResponseFactory;
|
||||
use League\Event\Emitter;
|
||||
|
||||
/**
|
||||
* The version of Flextype
|
||||
@@ -65,6 +66,13 @@ $app = new \Slim\App($config);
|
||||
*/
|
||||
$flextype = $app->getContainer();
|
||||
|
||||
/**
|
||||
* Add emitter service to Flextype container
|
||||
*/
|
||||
$flextype['emitter'] = function($container) {
|
||||
return new Emitter();
|
||||
};
|
||||
|
||||
/**
|
||||
* Add registry service to Flextype container
|
||||
*/
|
||||
|
Reference in New Issue
Block a user