generated from Potter/Template
init
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
# Potter Framework Component Template
|
||||
# Potter Framework Event Dispatcher Implementation
|
||||
|
||||
Hello World
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "potter/template",
|
||||
"description": "Potter Framework Component Template",
|
||||
"name": "potter/event",
|
||||
"description": "Potter Framework Event Dispatcher Implementation",
|
||||
"version": "1.0.0",
|
||||
"type": "library",
|
||||
"homepage": "https://gitpotter.com/Potter/Template",
|
||||
"homepage": "https://gitpotter.com/Potter/Event",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
@@ -14,11 +14,14 @@
|
||||
],
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Potter\\Template\\": "src/Potter/Template/"
|
||||
"Potter\\Event\\": "src/Potter/Event/"
|
||||
}
|
||||
},
|
||||
"minimum-stability": "stable",
|
||||
"require": {
|
||||
"php": "^8.3"
|
||||
"php": "^8.3",
|
||||
"psr/event-dispatcher": "^1.0",
|
||||
"league/event": "^3.0",
|
||||
"potter/aware": "^1.0"
|
||||
}
|
||||
}
|
||||
|
||||
10
src/Potter/Event/AbstractDispatcher.php
Normal file
10
src/Potter/Event/AbstractDispatcher.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Event;
|
||||
|
||||
use \League\Event\EventDispatcher as BaseDispatcher;
|
||||
|
||||
abstract class AbstractDispatcher extends BaseDispatcher implements DispatcherInterface
|
||||
{ }
|
||||
10
src/Potter/Event/Dispatcher.php
Normal file
10
src/Potter/Event/Dispatcher.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Event;
|
||||
|
||||
final class Dispatcher extends AbstractDispatcher
|
||||
{
|
||||
use DispatcherTrait;
|
||||
}
|
||||
15
src/Potter/Event/DispatcherAwareInterface.php
Normal file
15
src/Potter/Event/DispatcherAwareInterface.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Event;
|
||||
|
||||
use \League\Event\EventDispatcher as BaseDispatcher;
|
||||
use \League\Event\EventDispatcherAware as BaseDispatcherAwareInterface;
|
||||
use \Potter\Aware\AwareInterface;
|
||||
|
||||
interface DispatcherAwareInterface extends BaseDispatcherAwareInterface, AwareInterface
|
||||
{
|
||||
public function useEventDispatcher(BaseDispatcher $dispatcher): void;
|
||||
public function eventDispatcher(): BaseDispatcher;
|
||||
}
|
||||
8
src/Potter/Event/DispatcherAwareTrait.php
Normal file
8
src/Potter/Event/DispatcherAwareTrait.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Event;
|
||||
|
||||
trait DispatcherAwareTrait
|
||||
{ }
|
||||
13
src/Potter/Event/DispatcherInterface.php
Normal file
13
src/Potter/Event/DispatcherInterface.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Event;
|
||||
|
||||
use \League\Event\EventDispatchingListenerRegistry as BaseDispatcherInterface;
|
||||
use \Psr\EventDispatcher\EventDispatcherInterface as PsrDispatcherInterface;
|
||||
|
||||
interface DispatcherInterface extends BaseDispatcherInterface, PsrDispatcherInterface
|
||||
{
|
||||
public function dispatch(object $event): object;
|
||||
}
|
||||
8
src/Potter/Event/DispatcherTrait.php
Normal file
8
src/Potter/Event/DispatcherTrait.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Event;
|
||||
|
||||
trait DispatcherTrait
|
||||
{ }
|
||||
@@ -1,8 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Template;
|
||||
|
||||
interface TemplateInterface
|
||||
{ }
|
||||
@@ -1,8 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Template;
|
||||
|
||||
trait TemplateTrait
|
||||
{ }
|
||||
Reference in New Issue
Block a user