-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: jld3103 <[email protected]>
- Loading branch information
1 parent
fe900de
commit eee0a76
Showing
8 changed files
with
171 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
|
||
namespace bantu\IniGetWrapper; | ||
|
||
class IniGetWrapper {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Psr\Clock; | ||
|
||
use DateTimeImmutable; | ||
|
||
interface ClockInterface | ||
{ | ||
/** | ||
* Returns the current time as a DateTimeImmutable Object | ||
*/ | ||
public function now(): DateTimeImmutable; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Psr\Container; | ||
|
||
use Throwable; | ||
|
||
/** | ||
* Base interface representing a generic exception in a container. | ||
*/ | ||
interface ContainerExceptionInterface extends Throwable | ||
{ | ||
} | ||
|
||
/** | ||
* Describes the interface of a container that exposes methods to read its entries. | ||
*/ | ||
interface ContainerInterface | ||
{ | ||
/** | ||
* Finds an entry of the container by its identifier and returns it. | ||
* | ||
* @param string $id Identifier of the entry to look for. | ||
* | ||
* @throws NotFoundExceptionInterface No entry was found for **this** identifier. | ||
* @throws ContainerExceptionInterface Error while retrieving the entry. | ||
* | ||
* @return mixed Entry. | ||
*/ | ||
public function get(string $id); | ||
|
||
/** | ||
* Returns true if the container can return an entry for the given identifier. | ||
* Returns false otherwise. | ||
* | ||
* `has($id)` returning true does not mean that `get($id)` will not throw an exception. | ||
* It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`. | ||
* | ||
* @param string $id Identifier of the entry to look for. | ||
* | ||
* @return bool | ||
*/ | ||
public function has(string $id): bool; | ||
} | ||
|
||
/** | ||
* No entry was found in the container. | ||
*/ | ||
interface NotFoundExceptionInterface extends ContainerExceptionInterface | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Psr\EventDispatcher; | ||
|
||
/** | ||
* Defines a dispatcher for events. | ||
*/ | ||
interface EventDispatcherInterface | ||
{ | ||
/** | ||
* Provide all relevant listeners with an event to process. | ||
* | ||
* @param object $event | ||
* The object to process. | ||
* | ||
* @return object | ||
* The Event that was passed, now modified by listeners. | ||
*/ | ||
public function dispatch(object $event); | ||
} | ||
|
||
/** | ||
* Mapper from an event to the listeners that are applicable to that event. | ||
*/ | ||
interface ListenerProviderInterface | ||
{ | ||
/** | ||
* @param object $event | ||
* An event for which to return the relevant listeners. | ||
* @return iterable<callable> | ||
* An iterable (array, iterator, or generator) of callables. Each | ||
* callable MUST be type-compatible with $event. | ||
*/ | ||
public function getListenersForEvent(object $event) : iterable; | ||
} | ||
|
||
/** | ||
* An Event whose processing may be interrupted when the event has been handled. | ||
* | ||
* A Dispatcher implementation MUST check to determine if an Event | ||
* is marked as stopped after each listener is called. If it is then it should | ||
* return immediately without calling any further Listeners. | ||
*/ | ||
interface StoppableEventInterface | ||
{ | ||
/** | ||
* Is propagation stopped? | ||
* | ||
* This will typically only be used by the Dispatcher to determine if the | ||
* previous listener halted propagation. | ||
* | ||
* @return bool | ||
* True if the Event is complete and no further listeners should be called. | ||
* False to continue calling listeners. | ||
*/ | ||
public function isPropagationStopped() : bool; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
class ServiceUnavailable extends Exception { | ||
} | ||
|
||
class NotFound extends Exception { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Symfony\Component\EventDispatcher; | ||
|
||
interface EventDispatcherInterface { | ||
public function dispatch(mixed $event): object; | ||
} | ||
|
||
class GenericEvent { | ||
public function __construct(mixed $subject = null, array $arguments = []) { | ||
} | ||
|
||
public function getArgument(string $key): mixed { | ||
return null; | ||
} | ||
|
||
public function setArgument(string $key, mixed $value): GenericEvent { | ||
return $this; | ||
} | ||
|
||
public function hasArgument(string $key): bool { | ||
return false; | ||
} | ||
|
||
public function isPropagationStopped(): bool { | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters