From 8382157530c57be540492aff686a060b5bff03d8 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 1 Aug 2014 12:08:56 +0300 Subject: Make CI_Pagination properties per_page, cur_page public Useful if you want to make calculations based on them. --- system/libraries/Pagination.php | 76 ++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'system/libraries/Pagination.php') diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index 3c8baac36..b7df06292 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -51,45 +51,45 @@ class CI_Pagination { * * @var string */ - protected $prefix = ''; + protected $prefix = ''; /** * Suffix * * @var string */ - protected $suffix = ''; + protected $suffix = ''; /** * Total number of items * * @var int */ - protected $total_rows = 0; + protected $total_rows = 0; /** - * Items per page + * Number of links to show + * + * Relates to "digit" type links shown before/after + * the currently viewed page. * * @var int */ - protected $per_page = 10; + protected $num_links = 2; /** - * Number of links to show - * - * Relates to "digit" type links shown before/after - * the currently viewed page. + * Items per page * * @var int */ - protected $num_links = 2; + public $per_page = 10; /** * Current page * * @var int */ - protected $cur_page = 0; + public $cur_page = 0; /** * Use page numbers flag @@ -98,84 +98,84 @@ class CI_Pagination { * * @var bool */ - protected $use_page_numbers = FALSE; + protected $use_page_numbers = FALSE; /** * First link * * @var string */ - protected $first_link = '‹ First'; + protected $first_link = '‹ First'; /** * Next link * * @var string */ - protected $next_link = '>'; + protected $next_link = '>'; /** * Previous link * * @var string */ - protected $prev_link = '<'; + protected $prev_link = '<'; /** * Last link * * @var string */ - protected $last_link = 'Last ›'; + protected $last_link = 'Last ›'; /** * URI Segment * * @var int */ - protected $uri_segment = 0; + protected $uri_segment = 0; /** * Full tag open * * @var string */ - protected $full_tag_open = ''; + protected $full_tag_open = ''; /** * Full tag close * * @var string */ - protected $full_tag_close = ''; + protected $full_tag_close = ''; /** * First tag open * * @var string */ - protected $first_tag_open = ''; + protected $first_tag_open = ''; /** * First tag close * * @var string */ - protected $first_tag_close = ''; + protected $first_tag_close = ''; /** * Last tag open * * @var string */ - protected $last_tag_open = ''; + protected $last_tag_open = ''; /** * Last tag close * * @var string */ - protected $last_tag_close = ''; + protected $last_tag_close = ''; /** * First URL @@ -184,70 +184,70 @@ class CI_Pagination { * * @var string */ - protected $first_url = ''; + protected $first_url = ''; /** * Current tag open * * @var string */ - protected $cur_tag_open = ''; + protected $cur_tag_open = ''; /** * Current tag close * * @var string */ - protected $cur_tag_close = ''; + protected $cur_tag_close = ''; /** * Next tag open * * @var string */ - protected $next_tag_open = ''; + protected $next_tag_open = ''; /** * Next tag close * * @var string */ - protected $next_tag_close = ''; + protected $next_tag_close = ''; /** * Previous tag open * * @var string */ - protected $prev_tag_open = ''; + protected $prev_tag_open = ''; /** * Previous tag close * * @var string */ - protected $prev_tag_close = ''; + protected $prev_tag_close = ''; /** * Number tag open * * @var string */ - protected $num_tag_open = ''; + protected $num_tag_open = ''; /** * Number tag close * * @var string */ - protected $num_tag_close = ''; + protected $num_tag_close = ''; /** * Page query string flag * * @var bool */ - protected $page_query_string = FALSE; + protected $page_query_string = FALSE; /** * Query string segment @@ -261,14 +261,14 @@ class CI_Pagination { * * @var bool */ - protected $display_pages = TRUE; + protected $display_pages = TRUE; /** * Attributes * * @var string */ - protected $_attributes = ''; + protected $_attributes = ''; /** * Link types @@ -278,21 +278,21 @@ class CI_Pagination { * @see CI_Pagination::_attr_rel() * @var array */ - protected $_link_types = array(); + protected $_link_types = array(); /** * Reuse query string flag * * @var bool */ - protected $reuse_query_string = FALSE; + protected $reuse_query_string = FALSE; /** * Data page attribute * * @var string */ - protected $data_page_attr = 'data-ci-pagination-page'; + protected $data_page_attr = 'data-ci-pagination-page'; /** * CI Singleton -- cgit v1.2.3-24-g4f1b