Conditions | 1 |
Paths | 1 |
Total Lines | 33 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
8 | public function get_links($path, $total, $uri_segment) |
||
9 | { |
||
10 | # ページネーションクラスをロードします。 |
||
11 | $this->CI =& get_instance(); |
||
12 | $this->CI->load->library('pagination'); |
||
13 | |||
14 | $config = []; |
||
15 | # リンク先のURLを指定します。 |
||
16 | $config['base_url'] = $this->CI->config->site_url($path); |
||
|
|||
17 | # 総件数を指定します。 |
||
18 | $config['total_rows'] = $total; |
||
19 | # 1ページに表示する件数を指定します。 |
||
20 | $config['per_page'] = $this->CI->limit; |
||
21 | # ページ番号情報がどのURIセグメントに含まれるか指定します。 |
||
22 | $config['uri_segment'] = $uri_segment; |
||
23 | # ページネーションでクエリ文字列を使えるようにします。 |
||
24 | $config['reuse_query_string'] = TRUE; |
||
25 | # 生成するリンクのテンプレートを指定します。 |
||
26 | $config['first_link'] = '«最初'; |
||
27 | $config['last_link'] = '最後»'; |
||
28 | $config['full_tag_open'] = '<p>'; |
||
29 | $config['full_tag_close'] = '</p>'; |
||
30 | $config['num_tag_open'] = ' '; |
||
31 | $config['num_tag_close'] = ' '; |
||
32 | $config['last_tag_open'] = ' '; |
||
33 | $config['last_tag_close'] = ' '; |
||
34 | $config['first_tag_open'] = ' '; |
||
35 | $config['first_tag_close'] = ' '; |
||
36 | # $configでページネーションを初期化します。 |
||
37 | $this->CI->pagination->initialize($config); |
||
38 | # 生成したリンクの文字列を返します。 |
||
39 | return $this->CI->pagination->create_links(); |
||
40 | } |
||
41 | } |
||
42 |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.