@@ -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) |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | /** |
| 37 | 37 | * $builder->root() select only the root items |
| 38 | 38 | * |
| 39 | - * @param Jam_Builder $builder |
|
| 39 | + * @param Database_Query $builder |
|
| 40 | 40 | * @param Jam_Event_Data $data |
| 41 | 41 | * @return Jam_Builder |
| 42 | 42 | */ |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | * $builder->deleted(Jam_Behavior_Paranoid::DELETED), |
| 88 | 88 | * $builder->deleted(Jam_Behavior_Paranoid::NORMAL) |
| 89 | 89 | * |
| 90 | - * @param Jam_Builder $builder |
|
| 90 | + * @param Database_Query $builder |
|
| 91 | 91 | * @param Jam_Event_Data $data |
| 92 | 92 | * @param string $paranoid_filter_type |
| 93 | 93 | */ |
@@ -135,7 +135,6 @@ discard block |
||
| 135 | 135 | * $model->restore_delete() Perform this to "undelete" a model |
| 136 | 136 | * |
| 137 | 137 | * @param Jam_Model $model |
| 138 | - * @param Jam_Event_Data $data |
|
| 139 | 138 | */ |
| 140 | 139 | public function model_call_restore_delete(Jam_Model $model) |
| 141 | 140 | { |
@@ -36,8 +36,6 @@ discard block |
||
| 36 | 36 | * |
| 37 | 37 | * It sets the fields used in generating the slug |
| 38 | 38 | * |
| 39 | - * @param Jam_Event $event the jam event for the behavior |
|
| 40 | - * @param Jam_Model $model The Jam_Model object on which the behavior is applies |
|
| 41 | 39 | * @param string $name |
| 42 | 40 | * @return void |
| 43 | 41 | */ |
@@ -101,7 +99,7 @@ discard block |
||
| 101 | 99 | |
| 102 | 100 | /** |
| 103 | 101 | * Getter for parameter |
| 104 | - * @return bool |
|
| 102 | + * @return string |
|
| 105 | 103 | */ |
| 106 | 104 | public function slug() |
| 107 | 105 | { |
@@ -178,7 +176,7 @@ discard block |
||
| 178 | 176 | |
| 179 | 177 | /** |
| 180 | 178 | * Generated a find_by_slug method for Jam_Builder |
| 181 | - * @param Jam_Builder $builder the builder object |
|
| 179 | + * @param Jam_Query_Builder_Select $builder the builder object |
|
| 182 | 180 | * @param string $slug the slug to search for |
| 183 | 181 | * @param Jam_Event_Data $data |
| 184 | 182 | * @return void |
@@ -197,7 +195,7 @@ discard block |
||
| 197 | 195 | |
| 198 | 196 | /** |
| 199 | 197 | * Generated a find_by_slug method for Jam_Builder |
| 200 | - * @param Jam_Builder $builder the builder object |
|
| 198 | + * @param Jam_Query_Builder_Select $builder the builder object |
|
| 201 | 199 | * @param string $slug the slug to search for |
| 202 | 200 | * @param Jam_Event_Data $data |
| 203 | 201 | * @return void |
@@ -212,7 +210,7 @@ discard block |
||
| 212 | 210 | |
| 213 | 211 | /** |
| 214 | 212 | * Generates a find_by_slug_insist method for Jam_Builder |
| 215 | - * @param Jam_Builder $builder the builder object |
|
| 213 | + * @param Jam_Query_Builder_Select $builder the builder object |
|
| 216 | 214 | * @param string $slug the slug to search for |
| 217 | 215 | * @param Jam_Event_Data $data |
| 218 | 216 | * @return void |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | /** |
| 48 | 48 | * $select->order_by_position() |
| 49 | 49 | * |
| 50 | - * @param Jam_Builder $builder |
|
| 50 | + * @param Database_Query_Builder $builder |
|
| 51 | 51 | */ |
| 52 | 52 | public function builder_call_order_by_position(Database_Query_Builder $builder, Jam_Event_Data $data, $direction = NULL) |
| 53 | 53 | { |
@@ -29,11 +29,19 @@ |
||
| 29 | 29 | return $query->where(':primary_key', 'IN', (array) $ids); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | + /** |
|
| 33 | + * @param string $model |
|
| 34 | + * @param string $counter |
|
| 35 | + */ |
|
| 32 | 36 | public static function increment($model, $counter, $id) |
| 33 | 37 | { |
| 34 | 38 | Jam_CountCache::update_counters($model, $id, array($counter => +1))->execute(); |
| 35 | 39 | } |
| 36 | 40 | |
| 41 | + /** |
|
| 42 | + * @param string $model |
|
| 43 | + * @param string $counter |
|
| 44 | + */ |
|
| 37 | 45 | public static function decrement($model, $counter, $id) |
| 38 | 46 | { |
| 39 | 47 | Jam_CountCache::update_counters($model, $id, array($counter => -1))->execute(); |
@@ -63,8 +63,7 @@ discard block |
||
| 63 | 63 | /** |
| 64 | 64 | * Tracks a database result |
| 65 | 65 | * |
| 66 | - * @param mixed $result |
|
| 67 | - * @param mixed $model |
|
| 66 | + * @param Jam_Validated $model |
|
| 68 | 67 | */ |
| 69 | 68 | public function __construct(Jam_Validated $model, $error_filename) |
| 70 | 69 | { |
@@ -90,6 +89,9 @@ discard block |
||
| 90 | 89 | return $this; |
| 91 | 90 | } |
| 92 | 91 | |
| 92 | + /** |
|
| 93 | + * @param string $attribute |
|
| 94 | + */ |
|
| 93 | 95 | public function messages($attribute = NULL) |
| 94 | 96 | { |
| 95 | 97 | $messages = array(); |
@@ -243,6 +245,9 @@ discard block |
||
| 243 | 245 | throw new Kohana_Exception('Cannot set the errors directly, must use add() method'); |
| 244 | 246 | } |
| 245 | 247 | |
| 248 | + /** |
|
| 249 | + * @param integer $offset |
|
| 250 | + */ |
|
| 246 | 251 | public function offsetExists($offset) |
| 247 | 252 | { |
| 248 | 253 | return isset($this->_container[$offset]); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * @param string $event |
| 77 | 77 | * @param mixed $sender |
| 78 | 78 | * @param mixed $params... |
| 79 | - * @return mixed |
|
| 79 | + * @return string|null |
|
| 80 | 80 | */ |
| 81 | 81 | public function trigger($event, $sender, $params = array()) |
| 82 | 82 | { |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | * @param mixed $sender Jam_Model, Jam_Builder or Jam_Meta |
| 119 | 119 | * @param string $method |
| 120 | 120 | * @param array $params passed to the method |
| 121 | - * @return mixed returns the response from the callback |
|
| 121 | + * @return string|null returns the response from the callback |
|
| 122 | 122 | * @throws Jam_Exception_Methodmissing If no method is found |
| 123 | 123 | */ |
| 124 | 124 | public function trigger_callback($type, $sender, $method, $params) |
@@ -12,6 +12,10 @@ |
||
| 12 | 12 | |
| 13 | 13 | public $event; |
| 14 | 14 | |
| 15 | + /** |
|
| 16 | + * @param string $message |
|
| 17 | + * @param string $event |
|
| 18 | + */ |
|
| 15 | 19 | function __construct($message, $event, $fields = NULL) |
| 16 | 20 | { |
| 17 | 21 | $fields[':event'] = $this->event = $event; |