Added inline documentation.

This commit is contained in:
Andrey Savchenko committed 2018-02-14 17:54:28 +02:00
1 parent d850fa1b02
commit 8cd280f12a
20 files changed
+175 -29

No files matched your search

@@ -6,5 +6,10 @@ use Rarst\Laps\Plugin;
interface Bootable_Provider_Interface {
/**
* @param Plugin $laps Container instance.
*
* @return void
*/
public function boot( Plugin $laps );
}
+6
View File
@@ -10,8 +10,14 @@ use Rarst\Laps\Event\Hybrid_Events;
use Rarst\Laps\Event\THA_Events;
use Rarst\Laps\Event\Yoast_Events;
/**
* Registers hook event configuration for bundled vendor events.
*/
class Hook_Event_Provider implements ServiceProviderInterface {
/**
* @param Container $pimple Container instance.
*/
public function register( Container $pimple ) {
$pimple['hook.events'] = function () {
+9
View File
@@ -9,8 +9,14 @@ use Rarst\Laps\Manager\Asset_Manager;
use Rarst\Laps\Manager\Load_Order_Manager;
use Rarst\Laps\Manager\Toolbar_Manager;
/**
* Registers manager classes that implement functionality.
*/
class Manager_Provider implements ServiceProviderInterface, Bootable_Provider_Interface {
/**
* @param Container $pimple Container instance.
*/
public function register( Container $pimple ) {
$pimple['managers'] = function ( Plugin $laps ) {
@@ -22,6 +28,9 @@ class Manager_Provider implements ServiceProviderInterface, Bootable_Provider_In
};
}
/**
* @param Plugin $laps Container instance.
*/
public function boot( Plugin $laps ) {
$laps['managers'];
}
+9
View File
@@ -11,8 +11,14 @@ use Rarst\Laps\Record\Record_Collector_Interface;
use Rarst\Laps\Record\Sql_Record_Collector;
use Symfony\Component\Stopwatch\Stopwatch;
/**
* Registers record collectors (responsible to gather and compile event data) and their dependencies.
*/
class Record_Provider implements ServiceProviderInterface, Bootable_Provider_Interface {
/**
* @param Container $pimple Container instance.
*/
public function register( Container $pimple ) {
$pimple['stopwatch'] = $pimple->factory( function () {
@@ -40,6 +46,9 @@ class Record_Provider implements ServiceProviderInterface, Bootable_Provider_Int
};
}
/**
* @param Plugin $laps Container instance.
*/
public function boot( Plugin $laps ) {
$laps['collectors'];
}