add Behaviour trait
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Potter\Event;
|
||||||
|
|
||||||
|
use \Potter\Container;
|
||||||
|
|
||||||
|
trait Behaviour
|
||||||
|
{
|
||||||
|
private static function addDispatcher(Container $container): void
|
||||||
|
{
|
||||||
|
$container->addShared(Dispatcher::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function addEventBehaviour(Container $container): void
|
||||||
|
{
|
||||||
|
self::addDispatcher($container);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user