| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
namespace SmashBalloon\Reviews\Vendor\Invoker; |
| 5 |
|
| 6 |
use SmashBalloon\Reviews\Vendor\Invoker\Exception\InvocationException; |
| 7 |
use SmashBalloon\Reviews\Vendor\Invoker\Exception\NotCallableException; |
| 8 |
use SmashBalloon\Reviews\Vendor\Invoker\Exception\NotEnoughParametersException; |
| 9 |
/** |
| 10 |
* Invoke a callable. |
| 11 |
*/ |
| 12 |
interface InvokerInterface |
| 13 |
{ |
| 14 |
/** |
| 15 |
* Call the given function using the given parameters. |
| 16 |
* |
| 17 |
* @param callable|array|string $callable Function to call. |
| 18 |
* @param array $parameters Parameters to use. |
| 19 |
* @return mixed Result of the function. |
| 20 |
* @throws InvocationException Base exception class for all the sub-exceptions below. |
| 21 |
* @throws NotCallableException |
| 22 |
* @throws NotEnoughParametersException |
| 23 |
*/ |
| 24 |
public function call($callable, array $parameters = []); |
| 25 |
} |
| 26 |
|