diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2013-04-18 00:15:02 +0200 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2013-04-18 00:15:02 +0200 |
| commit | 86937e03ec4af92b6467427d9ee69467139f8119 (patch) | |
| tree | 5d2e77aaa2cc160623885f207395dd772fdb9e12 | |
| parent | 8c3443ba996c57a0420e4559022c97c2547404c0 (diff) | |
| download | forums-86937e03ec4af92b6467427d9ee69467139f8119.tar forums-86937e03ec4af92b6467427d9ee69467139f8119.tar.gz forums-86937e03ec4af92b6467427d9ee69467139f8119.tar.bz2 forums-86937e03ec4af92b6467427d9ee69467139f8119.tar.xz forums-86937e03ec4af92b6467427d9ee69467139f8119.zip | |
[ticket/11495] Remove item classes
PHPBB3-11495
| -rw-r--r-- | phpBB/includes/nestedset/item/base.php | 82 | ||||
| -rw-r--r-- | phpBB/includes/nestedset/item/forum.php | 28 | ||||
| -rw-r--r-- | phpBB/includes/nestedset/item/interface.php | 61 |
3 files changed, 0 insertions, 171 deletions
diff --git a/phpBB/includes/nestedset/item/base.php b/phpBB/includes/nestedset/item/base.php deleted file mode 100644 index c3a7600827..0000000000 --- a/phpBB/includes/nestedset/item/base.php +++ /dev/null @@ -1,82 +0,0 @@ -<?php -/** -* -* @package Nested Set -* @copyright (c) 2013 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 -* -*/ - -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - -abstract class phpbb_nestedset_item_base implements phpbb_nestedset_item_interface -{ - /** @var int */ - protected $item_id; - - /** @var int */ - protected $parent_id; - - /** @var string */ - protected $item_parents_data; - - /** @var int */ - protected $left_id; - - /** @var int */ - protected $right_id; - - /** - * @inheritdoc - */ - public function get_item_id() - { - return (int) $this->item_id; - } - - /** - * @inheritdoc - */ - public function get_parent_id() - { - return (int) $this->parent_id; - } - - /** - * @inheritdoc - */ - public function get_item_parents_data() - { - return (string) $this->item_parents_data; - } - - /** - * @inheritdoc - */ - public function get_left_id() - { - return (int) $this->left_id; - } - - /** - * @inheritdoc - */ - public function get_right_id() - { - return (int) $this->right_id; - } - - /** - * @inheritdoc - */ - public function has_children() - { - return $this->right_id - $this->left_id > 1; - } -} diff --git a/phpBB/includes/nestedset/item/forum.php b/phpBB/includes/nestedset/item/forum.php deleted file mode 100644 index 9475517999..0000000000 --- a/phpBB/includes/nestedset/item/forum.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -/** -* -* @package Nested Set -* @copyright (c) 2013 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 -* -*/ - -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - -class phpbb_nestedset_item_forum extends phpbb_nestedset_item_base -{ - public function __construct(array $forum_row) - { - $this->item_id = (int) $forum_row['forum_id']; - $this->parent_id = (int) $forum_row['parent_id']; - $this->left_id = (int) $forum_row['left_id']; - $this->right_id = (int) $forum_row['right_id']; - $this->item_parents_data = (string) $forum_row['forum_parents']; - } -} diff --git a/phpBB/includes/nestedset/item/interface.php b/phpBB/includes/nestedset/item/interface.php deleted file mode 100644 index 18206d752e..0000000000 --- a/phpBB/includes/nestedset/item/interface.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php -/** -* -* @package Nested Set -* @copyright (c) 2013 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 -* -*/ - -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - -interface phpbb_nestedset_item_interface -{ - /** - * Returns the ID of the item - * - * @return int - */ - public function get_item_id(); - - /** - * Returns the ID of the parent item - * - * @return int - */ - public function get_parent_id(); - - /** - * Returns a serialized or empty string with the data of the item's parents - * - * @return string - */ - public function get_item_parents_data(); - - /** - * Returns the left_id of the item - * - * @return int - */ - public function get_left_id(); - - /** - * Returns the right_id of the item - * - * @return int - */ - public function get_right_id(); - - /** - * Does the item have sub-items? - * - * @return bool - */ - public function has_children(); -} |
