1 | <?php |
||
28 | class Commander |
||
29 | { |
||
30 | /** |
||
31 | * The entity namespace. |
||
32 | */ |
||
33 | const ENTITY_NAMESPACE = 'GravityMedia\Commander\ORM'; |
||
34 | |||
35 | /** |
||
36 | * The logger name. |
||
37 | */ |
||
38 | const LOGGER_NAME = 'COMMANDER'; |
||
39 | |||
40 | /** |
||
41 | * @var bool |
||
42 | */ |
||
43 | protected $initialized; |
||
44 | |||
45 | /** |
||
46 | * @var Config |
||
47 | */ |
||
48 | protected $config; |
||
49 | |||
50 | /** |
||
51 | * The cache. |
||
52 | * |
||
53 | * @var Cache |
||
54 | */ |
||
55 | protected $cache; |
||
56 | |||
57 | /** |
||
58 | * The mapping driver. |
||
59 | * |
||
60 | * @var MappingDriver |
||
61 | */ |
||
62 | protected $mappingDriver; |
||
63 | |||
64 | /** |
||
65 | * The entity manager. |
||
66 | * |
||
67 | * @var EntityManagerInterface |
||
68 | */ |
||
69 | protected $entityManager; |
||
70 | |||
71 | /** |
||
72 | * The schema tool. |
||
73 | * |
||
74 | * @var SchemaTool |
||
75 | */ |
||
76 | protected $schemaTool; |
||
77 | |||
78 | /** |
||
79 | * The schema validator. |
||
80 | * |
||
81 | * @var SchemaValidator |
||
82 | */ |
||
83 | protected $schemaValidator; |
||
84 | |||
85 | /** |
||
86 | * The logger. |
||
87 | * |
||
88 | * @var LoggerInterface |
||
89 | */ |
||
90 | protected $logger; |
||
91 | |||
92 | /** |
||
93 | * The task manager. |
||
94 | * |
||
95 | * @var TaskManager |
||
96 | */ |
||
97 | protected $taskManager; |
||
98 | |||
99 | /** |
||
100 | * Create commander object. |
||
101 | * |
||
102 | * @param Config $config |
||
103 | */ |
||
104 | 12 | public function __construct(Config $config) |
|
109 | |||
110 | /** |
||
111 | * Initialize commander. |
||
112 | * |
||
113 | * @return $this |
||
114 | */ |
||
115 | 8 | public function initialize() |
|
132 | |||
133 | /** |
||
134 | * Get cache. |
||
135 | * |
||
136 | * @return Cache |
||
137 | */ |
||
138 | 8 | public function getCache() |
|
148 | |||
149 | /** |
||
150 | * Get mapping driver. |
||
151 | * |
||
152 | * @return MappingDriver |
||
153 | */ |
||
154 | 6 | public function getMappingDriver() |
|
164 | |||
165 | /** |
||
166 | * Get entity manager. |
||
167 | * |
||
168 | * @return EntityManagerInterface |
||
169 | * |
||
170 | * @throws \LogicException |
||
171 | */ |
||
172 | 6 | public function getEntityManager() |
|
186 | |||
187 | /** |
||
188 | * Get schema tool. |
||
189 | * |
||
190 | * @return SchemaTool |
||
191 | */ |
||
192 | 2 | public function getSchemaTool() |
|
202 | |||
203 | /** |
||
204 | * Get schema validator. |
||
205 | * |
||
206 | * @return SchemaValidator |
||
207 | */ |
||
208 | 2 | public function getSchemaValidator() |
|
218 | |||
219 | /** |
||
220 | * Get logger. |
||
221 | * |
||
222 | * @return LoggerInterface |
||
223 | */ |
||
224 | 2 | public function getLogger() |
|
234 | |||
235 | /** |
||
236 | * Get task manager. |
||
237 | * |
||
238 | * @return TaskManager |
||
239 | */ |
||
240 | 2 | public function getTaskManager() |
|
248 | } |
||
249 |