1 | <?php namespace Cerbero\Workflow; |
||
13 | class Workflow { |
||
14 | |||
15 | /** |
||
16 | * @author Andrea Marco Sartori |
||
17 | * @var Cerbero\Workflow\Repositories\PipelineRepositoryInterface $pipelines Pipelines repository. |
||
18 | */ |
||
19 | protected $pipelines; |
||
20 | |||
21 | /** |
||
22 | * @author Andrea Marco Sartori |
||
23 | * @var Cerbero\Workflow\Inflectors\InflectorInterface $inflector Inflector. |
||
24 | */ |
||
25 | protected $inflector; |
||
26 | |||
27 | /** |
||
28 | * @author Andrea Marco Sartori |
||
29 | * @var Illuminate\Contracts\Container\Container $container Service container. |
||
30 | */ |
||
31 | protected $container; |
||
32 | |||
33 | /** |
||
34 | * @author Andrea Marco Sartori |
||
35 | * @var Cerbero\Workflow\Wrappers\DispatcherInterface $dispatcher Bus dispatcher. |
||
36 | */ |
||
37 | protected $dispatcher; |
||
38 | |||
39 | /** |
||
40 | * Set the dependencies. |
||
41 | * |
||
42 | * @author Andrea Marco Sartori |
||
43 | * @param Cerbero\Workflow\Repositories\PipelineRepositoryInterface $pipelines |
||
44 | * @param Cerbero\Workflow\Wrappers\DispatcherInterface $dispatcher |
||
45 | * @param Cerbero\Workflow\Inflectors\InflectorInterface $inflector |
||
46 | * @param Illuminate\Contracts\Container\Container $container |
||
47 | * @return void |
||
|
|||
48 | */ |
||
49 | public function __construct( |
||
60 | |||
61 | /** |
||
62 | * Dynamically call pipelines. |
||
63 | * |
||
64 | * @author Andrea Marco Sartori |
||
65 | * @param string $name |
||
66 | * @param array $arguments |
||
67 | * @return mixed |
||
68 | */ |
||
69 | public function __call($name, $arguments) |
||
77 | |||
78 | /** |
||
79 | * Throw an exception if the given workflow does not exist. |
||
80 | * |
||
81 | * @author Andrea Marco Sartori |
||
82 | * @param string $workflow |
||
83 | * @return void |
||
84 | */ |
||
85 | protected function failIfNotExists($workflow) |
||
94 | |||
95 | /** |
||
96 | * Dispatch the given workflow. |
||
97 | * |
||
98 | * @author Andrea Marco Sartori |
||
99 | * @param string $workflow |
||
100 | * @return mixed |
||
101 | */ |
||
102 | protected function dispatchWorkflow($workflow) |
||
114 | |||
115 | /** |
||
116 | * Resolve the apter request. |
||
117 | * |
||
118 | * @author Andrea Marco Sartori |
||
119 | * @return Illuminate\Http\Request |
||
120 | */ |
||
121 | protected function resolveRequest() |
||
130 | |||
131 | } |
||
132 |
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.