| 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 |
} |
| 35 |
|