@@ -12,6 +12,16 @@ |
||
| 12 | 12 | interface ModelFactoryInterface |
| 13 | 13 | { |
| 14 | 14 | public function createModel($name, $context); |
| 15 | + |
|
| 16 | + /** |
|
| 17 | + * @param \ntentan\nibii\RecordWrapper $instance |
|
| 18 | + * |
|
| 19 | + * @return string |
|
| 20 | + */ |
|
| 15 | 21 | public function getModelTable($instance); |
| 22 | + |
|
| 23 | + /** |
|
| 24 | + * @return string |
|
| 25 | + */ |
|
| 16 | 26 | public function getJunctionClassName($classA, $classB); |
| 17 | 27 | } |
| 18 | 28 | \ No newline at end of file |
@@ -89,6 +89,9 @@ |
||
| 89 | 89 | return $this->config; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | + /** |
|
| 93 | + * @param RecordWrapper $model |
|
| 94 | + */ |
|
| 92 | 95 | public function getModelDescription($model) : ModelDescription |
| 93 | 96 | { |
| 94 | 97 | return new ModelDescription($model); |
@@ -27,7 +27,6 @@ |
||
| 27 | 27 | namespace ntentan\nibii\relationships; |
| 28 | 28 | |
| 29 | 29 | use ntentan\utils\Text; |
| 30 | -use ntentan\nibii\ORMContext; |
|
| 31 | 30 | |
| 32 | 31 | class HasManyRelationship extends \ntentan\nibii\Relationship { |
| 33 | 32 | |
@@ -26,10 +26,10 @@ |
||
| 26 | 26 | |
| 27 | 27 | namespace ntentan\nibii\relationships; |
| 28 | 28 | |
| 29 | -use ntentan\utils\Text; |
|
| 30 | 29 | use ntentan\nibii\NibiiException; |
| 31 | -use ntentan\nibii\Relationship; |
|
| 32 | 30 | use ntentan\nibii\ORMContext; |
| 31 | +use ntentan\nibii\Relationship; |
|
| 32 | +use ntentan\utils\Text; |
|
| 33 | 33 | |
| 34 | 34 | class ManyHaveManyRelationship extends Relationship |
| 35 | 35 | { |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | } |
| 34 | 34 | $classes = [$classA['class'], $classB['class']]; |
| 35 | 35 | sort($classes); |
| 36 | - return "{$classA['namespace']}\\" . implode('', $classes); |
|
| 36 | + return "{$classA['namespace']}\\".implode('', $classes); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | private function getClassFileDetails($className) { |