Added proper providers to handle registration and boot.

This commit is contained in:
Andrey Savchenko committed 2018-02-13 11:37:54 +02:00
1 parent 48b3383e06
commit 06e3bb4657
10 files changed
+95 -97

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Rarst\Laps\Provider;
use Pimple\Container;
use Pimple\ServiceProviderInterface;
use Rarst\Laps\Laps;
use Rarst\Laps\Manager\Asset_Manager;
use Rarst\Laps\Manager\Load_Order_Manager;
use Rarst\Laps\Manager\Toolbar_Manager;
class Manager_Provider implements ServiceProviderInterface, Bootable_Provider_Interface {
public function register( Container $pimple ) {
$pimple['managers'] = function ( Laps $laps ) {
return [
new Load_Order_Manager(),
new Asset_Manager(),
new Toolbar_Manager( $laps ),
];
};
}
public function boot( Laps $laps ) {
$laps['managers'];
}
}