@@ -10,6 +10,9 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | class Jam_Exception_Upload extends Kohana_Jam_Exception_Upload { |
| 12 | 12 | |
| 13 | + /** |
|
| 14 | + * @param string $message |
|
| 15 | + */ |
|
| 13 | 16 | function __construct($message, $fields = NULL) |
| 14 | 17 | { |
| 15 | 18 | parent::__construct($message, $fields); |
@@ -151,6 +151,7 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | /** |
| 153 | 153 | * Implement ArrayAccess. Lazy load with _load_content |
| 154 | + * @param integer|null $offset |
|
| 154 | 155 | */ |
| 155 | 156 | public function offsetSet($offset, $value) |
| 156 | 157 | { |
@@ -170,6 +171,7 @@ discard block |
||
| 170 | 171 | |
| 171 | 172 | /** |
| 172 | 173 | * Implement ArrayAccess. Lazy load with _load_content |
| 174 | + * @param integer $offset |
|
| 173 | 175 | */ |
| 174 | 176 | public function offsetUnset($offset) |
| 175 | 177 | { |
@@ -17,6 +17,9 @@ discard block |
||
| 17 | 17 | protected $_association; |
| 18 | 18 | protected $_parent; |
| 19 | 19 | |
| 20 | + /** |
|
| 21 | + * @param Jam_Validated $parent |
|
| 22 | + */ |
|
| 20 | 23 | public function parent($parent = NULL) |
| 21 | 24 | { |
| 22 | 25 | if ($parent !== NULL) |
@@ -27,6 +30,9 @@ discard block |
||
| 27 | 30 | return $this->_parent; |
| 28 | 31 | } |
| 29 | 32 | |
| 33 | + /** |
|
| 34 | + * @param Kohana_Jam_Association_Collection $association |
|
| 35 | + */ |
|
| 30 | 36 | public function association($association = NULL) |
| 31 | 37 | { |
| 32 | 38 | if ($association !== NULL) |
@@ -80,7 +86,7 @@ discard block |
||
| 80 | 86 | /** |
| 81 | 87 | * Use the association to get the item from the collection |
| 82 | 88 | * @param integer $offset |
| 83 | - * @return mixed |
|
| 89 | + * @return Jam_Model |
|
| 84 | 90 | */ |
| 85 | 91 | public function offsetGet($offset) |
| 86 | 92 | { |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | /** |
| 81 | 81 | * Getter of the meta object for this iterator (based on $_model) |
| 82 | - * @return Jam_Model |
|
| 82 | + * @return Jam_Meta |
|
| 83 | 83 | * @throws Kohana_Exception If $_model not present |
| 84 | 84 | */ |
| 85 | 85 | public function meta() |
@@ -248,6 +248,10 @@ discard block |
||
| 248 | 248 | return NULL; |
| 249 | 249 | } |
| 250 | 250 | |
| 251 | + /** |
|
| 252 | + * @param string $key |
|
| 253 | + * @param string $value |
|
| 254 | + */ |
|
| 251 | 255 | public function as_array($key = NULL, $value = NULL) |
| 252 | 256 | { |
| 253 | 257 | $results = array(); |
@@ -72,6 +72,9 @@ |
||
| 72 | 72 | return FALSE; |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | + /** |
|
| 76 | + * @param string $type |
|
| 77 | + */ |
|
| 75 | 78 | abstract public function join($table, $type = NULL); |
| 76 | 79 | |
| 77 | 80 | public function set(Jam_Validated $model, $value, $is_changed) |
@@ -45,7 +45,6 @@ |
||
| 45 | 45 | /** |
| 46 | 46 | * Automatically sets foreign to sensible defaults. |
| 47 | 47 | * |
| 48 | - * @param string $model |
|
| 49 | 48 | * @param string $name |
| 50 | 49 | * @return void |
| 51 | 50 | */ |
@@ -31,7 +31,6 @@ discard block |
||
| 31 | 31 | /** |
| 32 | 32 | * Automatically sets foreign to sensible defaults. |
| 33 | 33 | * |
| 34 | - * @param string $model |
|
| 35 | 34 | * @param string $name |
| 36 | 35 | * @return void |
| 37 | 36 | */ |
@@ -147,6 +146,9 @@ discard block |
||
| 147 | 146 | return $this->set($model, $item, $is_changed); |
| 148 | 147 | } |
| 149 | 148 | |
| 149 | + /** |
|
| 150 | + * @param boolean $is_changed |
|
| 151 | + */ |
|
| 150 | 152 | public function set(Jam_Validated $model, $value, $is_changed) |
| 151 | 153 | { |
| 152 | 154 | if ($value instanceof Jam_Model) |
@@ -285,6 +287,9 @@ discard block |
||
| 285 | 287 | return (bool) $this->as; |
| 286 | 288 | } |
| 287 | 289 | |
| 290 | + /** |
|
| 291 | + * @param string $foreign_model |
|
| 292 | + */ |
|
| 288 | 293 | protected function _find_item($foreign_model, $key) |
| 289 | 294 | { |
| 290 | 295 | if ( ! $key) |
@@ -308,6 +313,9 @@ discard block |
||
| 308 | 313 | return $query->current(); |
| 309 | 314 | } |
| 310 | 315 | |
| 316 | + /** |
|
| 317 | + * @param string $type |
|
| 318 | + */ |
|
| 311 | 319 | public function query_builder($type, Jam_Model $model) |
| 312 | 320 | { |
| 313 | 321 | $query = call_user_func("Jam::{$type}", $this->foreign_model) |
@@ -56,8 +56,6 @@ discard block |
||
| 56 | 56 | * This is called after construction so that fields can finish |
| 57 | 57 | * constructing themselves with a copy of the column it represents. |
| 58 | 58 | * |
| 59 | - * @param string $model |
|
| 60 | - * @param string $column |
|
| 61 | 59 | * @return void |
| 62 | 60 | **/ |
| 63 | 61 | public function initialize(Jam_Meta $meta, $name) |
@@ -80,6 +78,9 @@ discard block |
||
| 80 | 78 | $meta->events()->discover_events($this, Jam_Event::ATTRIBUTE_PRIORITY); |
| 81 | 79 | } |
| 82 | 80 | |
| 81 | + /** |
|
| 82 | + * @param boolean $is_changed |
|
| 83 | + */ |
|
| 83 | 84 | abstract public function get(Jam_Validated $model, $value, $is_changed); |
| 84 | 85 | |
| 85 | 86 | abstract public function set(Jam_Validated $model, $value, $is_changed); |
@@ -52,6 +52,11 @@ |
||
| 52 | 52 | return NULL; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | + /** |
|
| 56 | + * @param string $current |
|
| 57 | + * |
|
| 58 | + * @return Jam_Model |
|
| 59 | + */ |
|
| 55 | 60 | public static function get_current_children($current, array $children = array()) |
| 56 | 61 | { |
| 57 | 62 | foreach ($children as $model => $associations) |