/
Dispatcher.php
53 lines (45 loc) · 1.2 KB
/
Dispatcher.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php namespace Illuminate\Contracts\Bus;
use Closure;
use ArrayAccess;
interface Dispatcher {
/**
* Marshal a command and dispatch it to its appropriate handler.
*
* @param mixed $command
* @param array $array
* @return mixed
*/
public function dispatchFromArray($command, array $array);
/**
* Marshal a command and dispatch it to its appropriate handler.
*
* @param mixed $command
* @param \ArrayAccess $source
* @param array $extras
* @return mixed
*/
public function dispatchFrom($command, ArrayAccess $source, array $extras = []);
/**
* Dispatch a command to its appropriate handler.
*
* @param mixed $command
* @param \Closure|null $afterResolving
* @return mixed
*/
public function dispatch($command, Closure $afterResolving = null);
/**
* Dispatch a command to its appropriate handler in the current process.
*
* @param mixed $command
* @param \Closure|null $afterResolving
* @return mixed
*/
public function dispatchNow($command, Closure $afterResolving = null);
/**
* Set the pipes commands should be piped through before dispatching.
*
* @param array $pipes
* @return $this
*/
public function pipeThrough(array $pipes);
}