aboutsummaryrefslogtreecommitdiffstats
path: root/core/namespace
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-06-21 19:18:35 +0200
committerThomas Lange <code@nerdmind.de>2021-06-21 19:18:35 +0200
commit3eaf909b1fa8b07c6d8b23aa2c2ed3ec4e1932b7 (patch)
tree9d3ba9fcb9162963e26edbb7bda0709aaf2c8a41 /core/namespace
parentec424df850d6e5acc85d49ebd67703cf11f5a8d4 (diff)
downloadblog-3eaf909b1fa8b07c6d8b23aa2c2ed3ec4e1932b7.tar.gz
blog-3eaf909b1fa8b07c6d8b23aa2c2ed3ec4e1932b7.tar.xz
blog-3eaf909b1fa8b07c6d8b23aa2c2ed3ec4e1932b7.zip
Rename "attr" method of Item class to "get"
Diffstat (limited to 'core/namespace')
-rw-r--r--core/namespace/Application.php6
-rw-r--r--core/namespace/Item.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/core/namespace/Application.php b/core/namespace/Application.php
index 4414665..f9a8196 100644
--- a/core/namespace/Application.php
+++ b/core/namespace/Application.php
@@ -146,13 +146,13 @@ class Application {
switch($class = get_class($Entity)) {
case 'Page\Item':
$attr = self::get('PAGE.SLUG_URLS') ? 'slug' : 'id';
- return self::getPageURL($Entity->attr($attr).'/');
+ return self::getPageURL($Entity->get($attr).'/');
case 'Post\Item':
$attr = self::get('POST.SLUG_URLS') ? 'slug' : 'id';
- return self::getPostURL($Entity->attr($attr).'/');
+ return self::getPostURL($Entity->get($attr).'/');
case 'User\Item':
$attr = self::get('USER.SLUG_URLS') ? 'slug' : 'id';
- return self::getUserURL($Entity->attr($attr).'/');
+ return self::getUserURL($Entity->get($attr).'/');
default:
$error = 'Unknown URL handler for <code>%s</code> entities.';
throw new Exception(sprintf($error, $class));
diff --git a/core/namespace/Item.php b/core/namespace/Item.php
index 74b5688..453a3e6 100644
--- a/core/namespace/Item.php
+++ b/core/namespace/Item.php
@@ -32,7 +32,7 @@ abstract class Item implements ItemInterface {
#===============================================================================
# Return attribute by name (short hand wrapper)
#===============================================================================
- public function attr($attribute) {
+ public function get($attribute) {
return $this->Attribute->get($attribute);
}