From 3eaf909b1fa8b07c6d8b23aa2c2ed3ec4e1932b7 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Mon, 21 Jun 2021 19:18:35 +0200 Subject: Rename "attr" method of Item class to "get" --- admin/page/index.php | 2 +- admin/page/insert.php | 6 +++--- admin/page/search.php | 2 +- admin/page/update.php | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'admin/page') diff --git a/admin/page/index.php b/admin/page/index.php index 7c8b1a6..2fde136 100644 --- a/admin/page/index.php +++ b/admin/page/index.php @@ -34,7 +34,7 @@ $pageIDs = $Database->query(sprintf($execSQL, Page\Attribute::TABLE))->fetchAll( foreach($pageIDs as $pageID) { try { $Page = Page\Factory::build($pageID); - $User = User\Factory::build($Page->attr('user')); + $User = User\Factory::build($Page->get('user')); $ItemTemplate = generatePageItemTemplate($Page, $User); diff --git a/admin/page/insert.php b/admin/page/insert.php index 979dbd9..1f9d391 100644 --- a/admin/page/insert.php +++ b/admin/page/insert.php @@ -41,9 +41,9 @@ $userIDs = $Database->query(sprintf('SELECT id FROM %s ORDER BY fullname ASC', U foreach($userIDs->fetchAll($Database::FETCH_COLUMN) as $userID) { $User = User\Factory::build($userID); $userAttributes[] = [ - 'ID' => $User->attr('id'), - 'FULLNAME' => $User->attr('fullname'), - 'USERNAME' => $User->attr('username'), + 'ID' => $User->get('id'), + 'FULLNAME' => $User->get('fullname'), + 'USERNAME' => $User->get('username'), ]; } diff --git a/admin/page/search.php b/admin/page/search.php index eb57a7c..ba7f49a 100644 --- a/admin/page/search.php +++ b/admin/page/search.php @@ -18,7 +18,7 @@ if($search = HTTP::GET('q')) { foreach($pageIDs as $pageID) { try { $Page = Page\Factory::build($pageID); - $User = User\Factory::build($Page->attr('user')); + $User = User\Factory::build($Page->get('user')); $pages[] = generatePageItemTemplate($Page, $User); } diff --git a/admin/page/update.php b/admin/page/update.php index 8cbef7f..5e54b03 100644 --- a/admin/page/update.php +++ b/admin/page/update.php @@ -44,9 +44,9 @@ try { foreach($userIDs->fetchAll($Database::FETCH_COLUMN) as $userID) { $User = User\Factory::build($userID); $userAttributes[] = [ - 'ID' => $User->attr('id'), - 'FULLNAME' => $User->attr('fullname'), - 'USERNAME' => $User->attr('username'), + 'ID' => $User->get('id'), + 'FULLNAME' => $User->get('fullname'), + 'USERNAME' => $User->get('username'), ]; } -- cgit v1.2.3