PluginProbe
Metricool – Social media and site statistics / 2.1.1
Metricool – Social media and site statistics v2.1.1
2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.27 trunk
← All changes | app/Managers/ControllerManager.php +34 -0 2.0.1 → 2.1.1 View file →
@@ -1,0 +1,34 @@
1 +<?php
2 +
3 +declare(strict_types=1);
4 +
5 +namespace Metricool\Managers;
6 +
7 +use Metricool\Interfaces\ControllerInterface;
8 +
9 +final class ControllerManager extends AbstractManager
10 +{
11 + /**
12 + * @inheritDoc
13 + */
14 + public function isRegistrable(object $class): bool
15 + {
16 + return $class instanceof ControllerInterface;
17 + }
18 +
19 + /**
20 + * @inheritDoc
21 + */
22 + public function registerClass(object $class): void
23 + {
24 + $class->register();
25 + }
26 +
27 + /**
28 + * @inheritDoc
29 + */
30 + public function afterRegister(): void
31 + {
32 + do_action('metricool_controllers_loaded');
33 + }
34 +}