1 | <?php |
||
12 | class ORMContext |
||
|
|||
13 | { |
||
14 | |||
15 | private $dbContext; |
||
16 | private static $instance; |
||
17 | private $cache; |
||
18 | private $modelFactory; |
||
19 | private $driverAdapterFactory; |
||
20 | |||
21 | private function __construct(ModelFactoryInterface $modelFactory, DriverAdapterFactoryInterface $driverAdapterFactory, DbContext $dbContext, Cache $cache) |
||
28 | 36 | ||
29 | public static function initialize(ModelFactoryInterface $modelFactory, DriverAdapterFactoryInterface $driverAdapterFactory, DbContext $dbContext, Cache $cache) : ORMContext |
||
34 | 36 | ||
35 | /** |
||
36 | * A helper for loading a method described as a string. |
||
37 | * @param string $path Model name as string |
||
38 | * @return \nibii\RecordWrapper |
||
39 | * @throws NibiiException |
||
40 | */ |
||
41 | public function load($path) |
||
50 | |||
51 | /** |
||
52 | * Returns a class name for junction models needed to perform joint queries. |
||
53 | * @param string $classA |
||
54 | * @param string $classB |
||
55 | * @return string |
||
56 | */ |
||
57 | public function joinModels($classA, $classB) |
||
62 | 4 | ||
63 | /** |
||
64 | * @param RecordWrapper $instance |
||
65 | */ |
||
66 | public function getModelTable($instance) |
||
70 | 36 | ||
71 | 36 | public function getDriverAdapter() |
|
75 | |||
76 | 14 | /** |
|
77 | 14 | * @param string $class |
|
78 | */ |
||
79 | public function getModelName($class) |
||
83 | 28 | ||
84 | public static function getInstance() |
||
91 | |||
92 | public function getCache() |
||
96 | 36 | ||
97 | public function getConfig() |
||
101 | 28 | ||
102 | public function getModelDescription($model) |
||
106 | |||
107 | /** |
||
108 | * |
||
109 | * @return \ntentan\atiaa\DbContext |
||
110 | */ |
||
111 | public function getDbContext() |
||
115 | 36 | ||
116 | public function __destruct() |
||
120 | |||
121 | } |
||
122 |