1 | <?php |
||
14 | class EntityManagerFactory |
||
15 | { |
||
16 | /** |
||
17 | * @var Application |
||
18 | */ |
||
19 | private $application; |
||
20 | |||
21 | /** |
||
22 | * @var TokenProvider |
||
23 | */ |
||
24 | private $tokenProvider; |
||
25 | |||
26 | /** |
||
27 | * @var string Annotation cache directory |
||
28 | */ |
||
29 | private $annotationCacheDirectory; |
||
30 | |||
31 | /** |
||
32 | * @var string Proxy cache directory |
||
33 | */ |
||
34 | private $proxyCacheDirectory; |
||
35 | |||
36 | /** |
||
37 | * @param Application $phraseanetApplication |
||
38 | * @param TokenProvider $tokenProvider |
||
39 | */ |
||
40 | 8 | public function __construct( |
|
47 | |||
48 | /** |
||
49 | * @param string $path |
||
50 | */ |
||
51 | 1 | public function setAnnotationCacheDirectory($path) |
|
55 | |||
56 | /** |
||
57 | * @param string $path |
||
58 | */ |
||
59 | 1 | public function setProxyCacheDirectory($path) |
|
63 | |||
64 | /** |
||
65 | * @return \PhraseanetSDK\EntityManager |
||
66 | */ |
||
67 | 8 | public function getEntityManager() |
|
78 | |||
79 | /** |
||
80 | * @param $name |
||
81 | * @return \PhraseanetSDK\AbstractRepository |
||
82 | */ |
||
83 | 3 | public function getRepository($name) |
|
113 | |||
114 | /** |
||
115 | * Builds the options array used to build SDK entity managers |
||
116 | * |
||
117 | * @return array |
||
118 | */ |
||
119 | 8 | private function getOptions() |
|
137 | |||
138 | /** |
||
139 | * Creates a directory matching requested path if it does not exist |
||
140 | * |
||
141 | * @param string $path |
||
142 | */ |
||
143 | 2 | private function ensureDirectoryExists($path) |
|
149 | |||
150 | /** |
||
151 | * Creates a ProxyManager configuration instance |
||
152 | * |
||
153 | * @return Configuration |
||
154 | */ |
||
155 | 3 | private function getProxyFactoryConfiguration() |
|
166 | } |
||
167 |