From af73f007013eaa5469fc8cd0ef0b677e57a4042a Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Wed, 17 Feb 2021 20:08:22 +0100 Subject: [PATCH] Restrict access to GenericTable, Pagination class members. --- models/GenericTable.php | 18 +++++++----------- models/PageIndex.php | 24 ++++++++++++------------ 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/models/GenericTable.php b/models/GenericTable.php index d8ac071..eb540c1 100644 --- a/models/GenericTable.php +++ b/models/GenericTable.php @@ -8,18 +8,14 @@ class GenericTable { - protected $header = []; - protected $body = []; - protected $pageIndex = null; - protected $currentPage = 1; + private $header = []; + private $body = []; + private $pageIndex = null; + private $currentPage = 1; - protected $title; - protected $title_class; - protected $tableIsSortable = false; - protected $recordCount; - protected $needsPageIndex = false; - protected $current_page; - protected $num_pages; + private $title; + private $title_class; + private $tableIsSortable = false; public $form_above; public $form_below; diff --git a/models/PageIndex.php b/models/PageIndex.php index fe8a1a0..6033c9a 100644 --- a/models/PageIndex.php +++ b/models/PageIndex.php @@ -8,19 +8,19 @@ class PageIndex { - protected $base_url; - protected $current_page = 1; - protected $index_class = 'pagination'; - protected $items_per_page = 0; + private $base_url; + private $current_page = 1; + private $index_class = 'pagination'; + private $items_per_page = 0; private $linkBuilder; - protected $needsPageIndex = false; - protected $num_pages = 1; - protected $page_index = []; - protected $page_slug = '%AMP%page=%PAGE%'; - protected $recordCount = 0; - protected $sort_direction = null; - protected $sort_order = null; - protected $start = 0; + private $needsPageIndex = false; + private $num_pages = 1; + private $page_index = []; + private $page_slug = '%AMP%page=%PAGE%'; + private $recordCount = 0; + private $sort_direction = null; + private $sort_order = null; + private $start = 0; public function __construct($options) {