diff options
Diffstat (limited to 'phpBB/phpbb/tree/tree_interface.php')
| -rw-r--r-- | phpBB/phpbb/tree/tree_interface.php | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/phpBB/phpbb/tree/tree_interface.php b/phpBB/phpbb/tree/tree_interface.php new file mode 100644 index 0000000000..162c1e5e29 --- /dev/null +++ b/phpBB/phpbb/tree/tree_interface.php @@ -0,0 +1,124 @@ +<?php +/** +* +* @package tree +* @copyright (c) 2013 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\tree; + +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +interface tree_interface +{ + /** + * Inserts an item into the database table and into the tree. + * + * @param array $item The item to be added + * @return array Array with item data as set in the database + */ + public function insert(array $additional_data); + + /** + * Delete an item from the tree and from the database table + * + * Also deletes the subtree from the tree and from the database table + * + * @param int $item_id The item to be deleted + * @return array Item ids that have been deleted + */ + public function delete($item_id); + + /** + * Move an item by a given delta + * + * An item is only moved up/down within the same parent. If the delta is + * larger then the number of children, the item is moved to the top/bottom + * of the list of children within this parent. + * |
