1 | <?php |
||
28 | class AbstractTaskFactory implements TaskFactoryInterface |
||
29 | { |
||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | * |
||
33 | * This implementation returns true as soon as a protected method named: "create<TaskTypeName>" exists. |
||
34 | */ |
||
35 | public function isTypeSupported($taskType) |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | * |
||
43 | * This implementation will call the protected method named: "create<TaskTypeName>" if it exists. |
||
44 | * |
||
45 | * @throws \InvalidArgumentException For unsupported task types. |
||
46 | */ |
||
47 | public function createInstance($taskType, JsonArray $metaData) |
||
56 | |||
57 | /** |
||
58 | * Create a method name from a task type name. |
||
59 | * |
||
60 | * @param string $type The type to create the method name for. |
||
61 | * |
||
62 | * @return string |
||
63 | */ |
||
64 | protected function methodNameFromType($type) |
||
68 | } |
||
69 |