1 | <?php |
||
38 | class ORMContext |
||
|
|||
39 | { |
||
40 | private static $instance; |
||
41 | private $cache; |
||
42 | private $modelFactory; |
||
43 | private $modelValidatorFactory; |
||
44 | private $driverAdapterFactory; |
||
45 | |||
46 | 36 | private function __construct(ModelFactoryInterface $modelFactory, DriverAdapterFactoryInterface $driverAdapterFactory, ValidatorFactoryInterface $modelValidatorFactory, Cache $cache) |
|
53 | |||
54 | 36 | public static function initialize(ModelFactoryInterface $modelFactory, DriverAdapterFactoryInterface $driverAdapterFactory, ValidatorFactoryInterface $modelValidatorFactory, Cache $cache): self |
|
60 | |||
61 | /** |
||
62 | * A helper for loading a method described as a string. |
||
63 | * |
||
64 | * @param string $path Model name as string |
||
65 | * |
||
66 | * @throws NibiiException |
||
67 | * |
||
68 | * @return \nibii\RecordWrapper |
||
69 | */ |
||
70 | 6 | public function load($path) |
|
79 | |||
80 | /** |
||
81 | * @param RecordWrapper $instance |
||
82 | */ |
||
83 | 36 | public function getModelTable($instance) |
|
87 | |||
88 | 36 | public function getDriverAdapter() |
|
92 | |||
93 | /** |
||
94 | * @param string $class |
||
95 | */ |
||
96 | 28 | public function getModelName($class) |
|
100 | |||
101 | 36 | public static function getInstance() : self |
|
109 | |||
110 | 28 | public function getCache() |
|
114 | |||
115 | public function getConfig() |
||
119 | |||
120 | 28 | public function getModelDescription($model) : ModelDescription |
|
124 | |||
125 | 10 | public function getModelValidatorFactory() : ValidatorFactoryInterface |
|
129 | |||
130 | 12 | public function getModelFactory() : ModelFactoryInterface |
|
134 | |||
135 | /** |
||
136 | * @return \ntentan\atiaa\DbContext |
||
137 | */ |
||
138 | 36 | public function getDbContext() |
|
142 | |||
143 | public function __destruct() |
||
147 | } |
||
148 |