1 | <?php |
||
13 | class manager |
||
14 | { |
||
15 | /** @var array Array of tools from the service collection */ |
||
16 | protected $tools = array(); |
||
17 | |||
18 | /** |
||
19 | * Constructor |
||
20 | * |
||
21 | * @param array $tools Array of tools from the service collection |
||
22 | */ |
||
23 | 43 | public function __construct($tools) |
|
27 | |||
28 | /** |
||
29 | * Get all available tools |
||
30 | * |
||
31 | * @return array Array of available tools |
||
32 | */ |
||
33 | 38 | public function get_tools() |
|
50 | |||
51 | /** |
||
52 | * Get tool by name |
||
53 | * |
||
54 | * @param string $name Name of a trim tool service |
||
55 | * |
||
56 | * @return null|tools\tool_interface A trim tool object |
||
57 | */ |
||
58 | 5 | public function get_tool($name) |
|
71 | |||
72 | /** |
||
73 | * Configure tools in the proper order and remove |
||
74 | * any conflicting tools |
||
75 | * |
||
76 | * @param $tools array Array of available tools |
||
77 | * |
||
78 | * @return array Array of available tools |
||
79 | */ |
||
80 | 38 | protected function order_tools(array $tools) |
|
91 | } |
||
92 |