@@ -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(); |