1 | <?php |
||
15 | class Workflow |
||
16 | { |
||
17 | /** |
||
18 | * @author Andrea Marco Sartori |
||
19 | * |
||
20 | * @var Cerbero\Workflow\Repositories\PipelineRepositoryInterface $pipelines Pipelines repository. |
||
21 | */ |
||
22 | protected $pipelines; |
||
23 | |||
24 | /** |
||
25 | * @author Andrea Marco Sartori |
||
26 | * |
||
27 | * @var Cerbero\Workflow\Inflectors\InflectorInterface $inflector Inflector. |
||
28 | */ |
||
29 | protected $inflector; |
||
30 | |||
31 | /** |
||
32 | * @author Andrea Marco Sartori |
||
33 | * |
||
34 | * @var Illuminate\Contracts\Container\Container $container Service container. |
||
35 | */ |
||
36 | protected $container; |
||
37 | |||
38 | /** |
||
39 | * @author Andrea Marco Sartori |
||
40 | * |
||
41 | * @var Cerbero\Workflow\Wrappers\DispatcherInterface $dispatcher Bus dispatcher. |
||
42 | */ |
||
43 | protected $dispatcher; |
||
44 | |||
45 | /** |
||
46 | * Set the dependencies. |
||
47 | * |
||
48 | * @author Andrea Marco Sartori |
||
49 | * |
||
50 | * @param Cerbero\Workflow\Repositories\PipelineRepositoryInterface $pipelines |
||
51 | * @param Cerbero\Workflow\Wrappers\DispatcherInterface $dispatcher |
||
52 | * @param Cerbero\Workflow\Inflectors\InflectorInterface $inflector |
||
53 | * @param Illuminate\Contracts\Container\Container $container |
||
54 | * |
||
55 | * @return void |
||
|
|||
56 | */ |
||
57 | 12 | public function __construct( |
|
68 | |||
69 | /** |
||
70 | * Dynamically call pipelines. |
||
71 | * |
||
72 | * @author Andrea Marco Sartori |
||
73 | * |
||
74 | * @param string $name |
||
75 | * @param array $arguments |
||
76 | * |
||
77 | * @return mixed |
||
78 | */ |
||
79 | 9 | public function __call($name, $arguments) |
|
87 | |||
88 | /** |
||
89 | * Throw an exception if the given workflow does not exist. |
||
90 | * |
||
91 | * @author Andrea Marco Sartori |
||
92 | * |
||
93 | * @param string $workflow |
||
94 | * |
||
95 | * @return void |
||
96 | */ |
||
97 | 9 | protected function failIfNotExists($workflow) |
|
105 | |||
106 | /** |
||
107 | * Dispatch the given workflow. |
||
108 | * |
||
109 | * @author Andrea Marco Sartori |
||
110 | * |
||
111 | * @param string $workflow |
||
112 | * |
||
113 | * @return mixed |
||
114 | */ |
||
115 | 6 | protected function dispatchWorkflow($workflow) |
|
127 | |||
128 | /** |
||
129 | * Resolve the apter request. |
||
130 | * |
||
131 | * @author Andrea Marco Sartori |
||
132 | * |
||
133 | * @return Illuminate\Http\Request |
||
134 | */ |
||
135 | 6 | protected function resolveRequest() |
|
143 | } |
||
144 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.