@@ -237,6 +237,9 @@ |
||
| 237 | 237 | } |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | + /** |
|
| 241 | + * @param string $event |
|
| 242 | + */ |
|
| 240 | 243 | private function runBehaviours($event, $args) |
| 241 | 244 | { |
| 242 | 245 | foreach($this->wrapper->getBehaviours() as $behaviour) { |
@@ -204,6 +204,10 @@ |
||
| 204 | 204 | return $return; |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | + /** |
|
| 208 | + * @param integer $level |
|
| 209 | + * @param string $opr |
|
| 210 | + */ |
|
| 207 | 211 | private function parseRightExpression($level, $opr) |
| 208 | 212 | { |
| 209 | 213 | switch ($opr) { |
@@ -45,6 +45,9 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | + /** |
|
| 49 | + * @param RecordWrapper $instance |
|
| 50 | + */ |
|
| 48 | 51 | public static function getModelTable($instance) |
| 49 | 52 | { |
| 50 | 53 | if(self::$tableResolver) { |
@@ -68,6 +71,9 @@ discard block |
||
| 68 | 71 | return $className; |
| 69 | 72 | } |
| 70 | 73 | |
| 74 | + /** |
|
| 75 | + * @param string $class |
|
| 76 | + */ |
|
| 71 | 77 | public static function getModelName($class) |
| 72 | 78 | { |
| 73 | 79 | if(self::$modelResolver) { |
@@ -6,11 +6,17 @@ discard block |
||
| 6 | 6 | |
| 7 | 7 | private $db; |
| 8 | 8 | |
| 9 | + /** |
|
| 10 | + * @param \ntentan\atiaa\Driver $driver |
|
| 11 | + */ |
|
| 9 | 12 | public function setDriver($driver) |
| 10 | 13 | { |
| 11 | 14 | $this->db = $driver; |
| 12 | 15 | } |
| 13 | 16 | |
| 17 | + /** |
|
| 18 | + * @param string $query |
|
| 19 | + */ |
|
| 14 | 20 | private function filter($query) |
| 15 | 21 | { |
| 16 | 22 | return $query; |
@@ -34,6 +40,9 @@ discard block |
||
| 34 | 40 | ); |
| 35 | 41 | } |
| 36 | 42 | |
| 43 | + /** |
|
| 44 | + * @return string |
|
| 45 | + */ |
|
| 37 | 46 | public function getBulkUpdateQuery($data, $parameters) |
| 38 | 47 | { |
| 39 | 48 | $updateData = []; |
@@ -74,6 +83,9 @@ discard block |
||
| 74 | 83 | ); |
| 75 | 84 | } |
| 76 | 85 | |
| 86 | + /** |
|
| 87 | + * @return string |
|
| 88 | + */ |
|
| 77 | 89 | public function getSelectQuery($parameters) |
| 78 | 90 | { |
| 79 | 91 | return $this->filter(sprintf( |
@@ -88,6 +100,9 @@ discard block |
||
| 88 | 100 | ); |
| 89 | 101 | } |
| 90 | 102 | |
| 103 | + /** |
|
| 104 | + * @return string |
|
| 105 | + */ |
|
| 91 | 106 | public function getCountQuery($parameters) |
| 92 | 107 | { |
| 93 | 108 | return $this->filter(sprintf( |
@@ -98,6 +113,9 @@ discard block |
||
| 98 | 113 | ); |
| 99 | 114 | } |
| 100 | 115 | |
| 116 | + /** |
|
| 117 | + * @return string |
|
| 118 | + */ |
|
| 101 | 119 | public function getDeleteQuery($parameters) |
| 102 | 120 | { |
| 103 | 121 | return $this->filter(sprintf( |
@@ -23,7 +23,6 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * |
| 26 | - * @param \ $model |
|
| 27 | 26 | */ |
| 28 | 27 | public function __construct($wrapper) |
| 29 | 28 | { |
@@ -118,6 +117,9 @@ discard block |
||
| 118 | 117 | $this->boundData += $values; |
| 119 | 118 | } |
| 120 | 119 | |
| 120 | + /** |
|
| 121 | + * @param boolean $firstOnly |
|
| 122 | + */ |
|
| 121 | 123 | public function setFirstOnly($firstOnly) |
| 122 | 124 | { |
| 123 | 125 | $this->firstOnly = $firstOnly; |
@@ -139,6 +141,9 @@ discard block |
||
| 139 | 141 | $this->offset = $offset; |
| 140 | 142 | } |
| 141 | 143 | |
| 144 | + /** |
|
| 145 | + * @param string $field |
|
| 146 | + */ |
|
| 142 | 147 | public function addSort($field, $direction = 'ASC') |
| 143 | 148 | { |
| 144 | 149 | $this->sorts[] = "$field $direction"; |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | |
| 124 | 124 | /** |
| 125 | 125 | * @method |
| 126 | - * @param type $name |
|
| 126 | + * @param string $name |
|
| 127 | 127 | * @param type $arguments |
| 128 | 128 | * @return type |
| 129 | 129 | */ |
@@ -157,6 +157,9 @@ discard block |
||
| 157 | 157 | return $this->table; |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | + /** |
|
| 161 | + * @param integer $depth |
|
| 162 | + */ |
|
| 160 | 163 | private function expandArrayValue($array, $relationships, $depth, $index = null) |
| 161 | 164 | { |
| 162 | 165 | foreach($relationships as $name => $relationship) { |
@@ -9,5 +9,8 @@ |
||
| 9 | 9 | */ |
| 10 | 10 | interface TableNameResolverInterface |
| 11 | 11 | { |
| 12 | + /** |
|
| 13 | + * @return string |
|
| 14 | + */ |
|
| 12 | 15 | public function getTableName($instance); |
| 13 | 16 | } |
@@ -9,5 +9,8 @@ |
||
| 9 | 9 | */ |
| 10 | 10 | interface TableNameResolverInterface |
| 11 | 11 | { |
| 12 | + /** |
|
| 13 | + * @return string |
|
| 14 | + */ |
|
| 12 | 15 | public function getTableName($instance); |
| 13 | 16 | } |
@@ -23,6 +23,9 @@ |
||
| 23 | 23 | 'save' |
| 24 | 24 | ]; |
| 25 | 25 | |
| 26 | + /** |
|
| 27 | + * @param RecordWrapper $wrapper |
|
| 28 | + */ |
|
| 26 | 29 | public function __construct($wrapper, $adapter) |
| 27 | 30 | { |
| 28 | 31 | $this->wrapper = $wrapper; |