1 | <?php |
||
18 | class TaskFactory |
||
19 | { |
||
20 | /** |
||
21 | * @var ContainerBuilder |
||
22 | */ |
||
23 | protected $container; |
||
24 | |||
25 | /** |
||
26 | * @var string[] |
||
27 | */ |
||
28 | protected $tasks = array(); |
||
29 | |||
30 | /** |
||
31 | * @var string[] |
||
32 | */ |
||
33 | protected $configurations = array(); |
||
34 | |||
35 | /** |
||
36 | * @param ContainerBuilder $container |
||
37 | */ |
||
38 | 3 | public function __construct(ContainerBuilder $container) |
|
42 | |||
43 | /** |
||
44 | * @param string $serviceId |
||
45 | * @param string $alias |
||
46 | * @param string|bool $configuration |
||
47 | */ |
||
48 | 3 | public function addTask($serviceId, $alias, $configuration = false) |
|
53 | |||
54 | /** |
||
55 | * @return array |
||
56 | */ |
||
57 | public function getTasks() |
||
61 | |||
62 | /** |
||
63 | * Returns task |
||
64 | * |
||
65 | * @param string $alias name of the task |
||
66 | * @param array $options configuration options for the task |
||
67 | * @return Task |
||
68 | */ |
||
69 | public function get($alias, array $options = array()) |
||
78 | |||
79 | /** |
||
80 | * Returns task configuration |
||
81 | * |
||
82 | * @param string $alias task name |
||
83 | * @return ConfigurationInterface|boolean |
||
84 | */ |
||
85 | public function configuration($alias) |
||
95 | } |
||
96 |