@@ -56,6 +56,9 @@ discard block |
||
56 | 56 | ->getJunctionClassName($classA, $classB); |
57 | 57 | } |
58 | 58 | |
59 | + /** |
|
60 | + * @param RecordWrapper $instance |
|
61 | + */ |
|
59 | 62 | public function getModelTable($instance) { |
60 | 63 | return$this->container->singleton(interfaces\TableNameResolverInterface::class) |
61 | 64 | ->getTableName($instance); |
@@ -66,6 +69,9 @@ discard block |
||
66 | 69 | ->getModelClassName($model, $context); |
67 | 70 | } |
68 | 71 | |
72 | + /** |
|
73 | + * @param string $class |
|
74 | + */ |
|
69 | 75 | public function getModelName($class) { |
70 | 76 | return $class; |
71 | 77 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | /** |
42 | 42 | * |
43 | 43 | * |
44 | - * @param type $parameters |
|
44 | + * @param QueryParameters $parameters |
|
45 | 45 | * @return type |
46 | 46 | */ |
47 | 47 | public function select($parameters) { |
@@ -57,6 +57,9 @@ discard block |
||
57 | 57 | return $result; |
58 | 58 | } |
59 | 59 | |
60 | + /** |
|
61 | + * @param QueryParameters $parameters |
|
62 | + */ |
|
60 | 63 | public function count($parameters) { |
61 | 64 | $result = $this->driver->query( |
62 | 65 | $this->getQueryEngine()->getCountQuery($parameters), $parameters->getBoundData() |
@@ -87,12 +90,18 @@ discard block |
||
87 | 90 | return $this->driver->query($this->updateQuery, $record); |
88 | 91 | } |
89 | 92 | |
93 | + /** |
|
94 | + * @param QueryParameters $parameters |
|
95 | + */ |
|
90 | 96 | public function bulkUpdate($data, $parameters) { |
91 | 97 | return $this->driver->query( |
92 | 98 | $this->getQueryEngine()->getBulkUpdateQuery($data, $parameters), array_merge($data, $parameters->getBoundData()) |
93 | 99 | ); |
94 | 100 | } |
95 | 101 | |
102 | + /** |
|
103 | + * @param QueryParameters $parameters |
|
104 | + */ |
|
96 | 105 | public function delete($parameters) { |
97 | 106 | return $this->driver->query( |
98 | 107 | $this->getQueryEngine()->getDeleteQuery($parameters), $parameters->getBoundData() |
@@ -119,6 +128,9 @@ discard block |
||
119 | 128 | return $this->queryEngine; |
120 | 129 | } |
121 | 130 | |
131 | + /** |
|
132 | + * @param RecordWrapper $model |
|
133 | + */ |
|
122 | 134 | public function setModel($model) { |
123 | 135 | $this->modelInstance = $model; |
124 | 136 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | /** |
52 | 52 | * |
53 | 53 | * @param RecordWrapper $wrapper |
54 | - * @param DataAdapter $adapter |
|
54 | + * @param DriverAdapter $adapter |
|
55 | 55 | * @param DataOperations $dataOperations |
56 | 56 | */ |
57 | 57 | public function __construct(Context $context, RecordWrapper $wrapper, DriverAdapter $adapter, $dataOperations) { |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | /** |
24 | 24 | * |
25 | - * @param \ $model |
|
25 | + * @param string $table |
|
26 | 26 | */ |
27 | 27 | public function __construct($table) { |
28 | 28 | $this->table = $table; |
@@ -104,6 +104,9 @@ discard block |
||
104 | 104 | $this->boundData += $values; |
105 | 105 | } |
106 | 106 | |
107 | + /** |
|
108 | + * @param boolean $firstOnly |
|
109 | + */ |
|
107 | 110 | public function setFirstOnly($firstOnly) { |
108 | 111 | $this->firstOnly = $firstOnly; |
109 | 112 | return $this; |
@@ -121,6 +124,9 @@ discard block |
||
121 | 124 | $this->offset = $offset; |
122 | 125 | } |
123 | 126 | |
127 | + /** |
|
128 | + * @param string $field |
|
129 | + */ |
|
124 | 130 | public function addSort($field, $direction = 'ASC') { |
125 | 131 | $this->sorts[] = "$field $direction"; |
126 | 132 | } |