Renamed main class to Plugin for more clear role.
This commit is contained in:
1 parent
a19e4fb019
commit
d850fa1b02
6 files changed
+16
-16
No files matched your search
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace Rarst\Laps\Provider;
|
||||
|
||||
use Rarst\Laps\Laps;
|
||||
use Rarst\Laps\Plugin;
|
||||
|
||||
interface Bootable_Provider_Interface {
|
||||
|
||||
public function boot( Laps $laps );
|
||||
public function boot( Plugin $laps );
|
||||
}
|
||||
@@ -4,7 +4,7 @@ namespace Rarst\Laps\Provider;
|
||||
|
||||
use Pimple\Container;
|
||||
use Pimple\ServiceProviderInterface;
|
||||
use Rarst\Laps\Laps;
|
||||
use Rarst\Laps\Plugin;
|
||||
use Rarst\Laps\Manager\Asset_Manager;
|
||||
use Rarst\Laps\Manager\Load_Order_Manager;
|
||||
use Rarst\Laps\Manager\Toolbar_Manager;
|
||||
@@ -13,7 +13,7 @@ class Manager_Provider implements ServiceProviderInterface, Bootable_Provider_In
|
||||
|
||||
public function register( Container $pimple ) {
|
||||
|
||||
$pimple['managers'] = function ( Laps $laps ) {
|
||||
$pimple['managers'] = function ( Plugin $laps ) {
|
||||
return [
|
||||
new Load_Order_Manager(),
|
||||
new Asset_Manager(),
|
||||
@@ -22,7 +22,7 @@ class Manager_Provider implements ServiceProviderInterface, Bootable_Provider_In
|
||||
};
|
||||
}
|
||||
|
||||
public function boot( Laps $laps ) {
|
||||
public function boot( Plugin $laps ) {
|
||||
$laps['managers'];
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ namespace Rarst\Laps\Provider;
|
||||
|
||||
use Pimple\Container;
|
||||
use Pimple\ServiceProviderInterface;
|
||||
use Rarst\Laps\Laps;
|
||||
use Rarst\Laps\Plugin;
|
||||
use Rarst\Laps\Record\Hook_Record_Collector;
|
||||
use Rarst\Laps\Record\Http_Record_Collector;
|
||||
use Rarst\Laps\Record\Record_Collector_Interface;
|
||||
@@ -19,7 +19,7 @@ class Record_Provider implements ServiceProviderInterface, Bootable_Provider_Int
|
||||
return new Stopwatch();
|
||||
} );
|
||||
|
||||
$pimple['collectors'] = function ( Laps $laps ) {
|
||||
$pimple['collectors'] = function ( Plugin $laps ) {
|
||||
return [
|
||||
'hook' => new Hook_Record_Collector( $laps['hook.events'], $laps['stopwatch'] ),
|
||||
'http' => new Http_Record_Collector( $laps['stopwatch'] ),
|
||||
@@ -27,7 +27,7 @@ class Record_Provider implements ServiceProviderInterface, Bootable_Provider_Int
|
||||
];
|
||||
};
|
||||
|
||||
$pimple['records'] = function ( Laps $laps ) {
|
||||
$pimple['records'] = function ( Plugin $laps ) {
|
||||
|
||||
$records = [];
|
||||
|
||||
@@ -40,7 +40,7 @@ class Record_Provider implements ServiceProviderInterface, Bootable_Provider_Int
|
||||
};
|
||||
}
|
||||
|
||||
public function boot( Laps $laps ) {
|
||||
public function boot( Plugin $laps ) {
|
||||
$laps['collectors'];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user