1 | <?php |
||
13 | class ORMContext { |
||
14 | |||
15 | private $container; |
||
16 | private $dbContext; |
||
17 | private static $instance; |
||
18 | private $cache; |
||
19 | private $config; |
||
20 | 37 | ||
21 | 37 | public function __construct(Container $container, array $config) { |
|
34 | |||
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 | 6 | * @throws NibiiException |
|
40 | */ |
||
41 | 6 | 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 | 4 | * @return string |
|
56 | 4 | */ |
|
57 | 4 | public function joinModels($classA, $classB) { |
|
61 | |||
62 | /** |
||
63 | 37 | * @param RecordWrapper $instance |
|
64 | 37 | */ |
|
65 | 37 | public function getModelTable($instance) { |
|
69 | 14 | ||
70 | 14 | public function getClassName($model, $context = null) { |
|
74 | |||
75 | /** |
||
76 | 28 | * @param string $class |
|
77 | 28 | */ |
|
78 | public function getModelName($class) { |
||
81 | 35 | ||
82 | 35 | public static function getInstance() { |
|
86 | 37 | ||
87 | public function getContainer() { |
||
90 | 28 | ||
91 | public function getCache() { |
||
94 | |||
95 | public function getConfig() { |
||
98 | 37 | ||
99 | /** |
||
100 | * |
||
101 | * @return \ntentan\atiaa\DbContext |
||
102 | */ |
||
103 | public function getDbContext() { |
||
106 | |||
107 | public function __destruct() { |
||
110 | |||
111 | } |
||
112 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.