@@ -311,6 +311,9 @@ |
||
311 | 311 | } |
312 | 312 | |
313 | 313 | # 携帯端末かどうかを判定し、ビューをロードするプライベートメソッドです。 |
314 | + /** |
|
315 | + * @param string $file |
|
316 | + */ |
|
314 | 317 | private function _load_view($file, $data = '') |
315 | 318 | { |
316 | 319 | # 携帯端末の場合は、「_mobile」がファイル名に付くビューファイルをロードします。 |
@@ -5,6 +5,12 @@ |
||
5 | 5 | private $CI; |
6 | 6 | |
7 | 7 | // ページネーションの生成 |
8 | + |
|
9 | + /** |
|
10 | + * @param string $path |
|
11 | + * @param integer $total |
|
12 | + * @param integer $uri_segment |
|
13 | + */ |
|
8 | 14 | public function get_links($path, $total, $uri_segment) |
9 | 15 | { |
10 | 16 | # ページネーションクラスをロードします。 |
@@ -20,6 +20,9 @@ |
||
20 | 20 | $this->CI->form_validation->set_error_delimiters($prefix, $suffix); |
21 | 21 | } |
22 | 22 | |
23 | + /** |
|
24 | + * @param string $field |
|
25 | + */ |
|
23 | 26 | protected function set_rules( |
24 | 27 | $field, $label = '', $rules = array(), $errors = array() |
25 | 28 | ) |
@@ -10,6 +10,9 @@ |
||
10 | 10 | $this->CI->load->library('form_validation'); |
11 | 11 | } |
12 | 12 | |
13 | + /** |
|
14 | + * @param string $rules |
|
15 | + */ |
|
13 | 16 | public function validate($value, $rules, $errors = []) |
14 | 17 | { |
15 | 18 | $this->CI->form_validation->reset_validation(); |
@@ -18,6 +18,9 @@ discard block |
||
18 | 18 | return $query->result(); |
19 | 19 | } |
20 | 20 | |
21 | + /** |
|
22 | + * @param string $id |
|
23 | + */ |
|
21 | 24 | public function get_category_name($id) |
22 | 25 | { |
23 | 26 | $this->db->select('name'); |
@@ -27,6 +30,11 @@ discard block |
||
27 | 30 | return $row->name; |
28 | 31 | } |
29 | 32 | |
33 | + /** |
|
34 | + * @param string $cat_id |
|
35 | + * @param string|null $limit |
|
36 | + * @param string $offset |
|
37 | + */ |
|
30 | 38 | public function get_product_list($cat_id, $limit, $offset) |
31 | 39 | { |
32 | 40 | $this->db->where('category_id', $cat_id); |
@@ -35,6 +43,9 @@ discard block |
||
35 | 43 | return $query->result(); |
36 | 44 | } |
37 | 45 | |
46 | + /** |
|
47 | + * @param string $cat_id |
|
48 | + */ |
|
38 | 49 | public function get_product_count($cat_id) |
39 | 50 | { |
40 | 51 | $this->db->where('category_id', $cat_id); |
@@ -49,6 +60,9 @@ discard block |
||
49 | 60 | return $query->row(); |
50 | 61 | } |
51 | 62 | |
63 | + /** |
|
64 | + * @param integer $id |
|
65 | + */ |
|
52 | 66 | public function is_available_product_item($id) |
53 | 67 | { |
54 | 68 | $this->db->where('id', $id); |
@@ -63,6 +77,11 @@ discard block |
||
63 | 77 | } |
64 | 78 | } |
65 | 79 | |
80 | + /** |
|
81 | + * @param string $q |
|
82 | + * @param string|null $limit |
|
83 | + * @param string $offset |
|
84 | + */ |
|
66 | 85 | public function get_product_by_search($q, $limit, $offset) |
67 | 86 | { |
68 | 87 | # 検索キーワードをスペースで分割し、like()メソッドでLIKE句を指定します。 |
@@ -78,6 +97,9 @@ discard block |
||
78 | 97 | return $query->result(); |
79 | 98 | } |
80 | 99 | |
100 | + /** |
|
101 | + * @param string $q |
|
102 | + */ |
|
81 | 103 | public function get_count_by_search($q) |
82 | 104 | { |
83 | 105 | $this->db->select('name'); |