Node_DatabaseChild_Container.class.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Represents container node that carries children of a database
  5. *
  6. * @package PhpMyAdmin-Navigation
  7. */
  8. if (! defined('PHPMYADMIN')) {
  9. exit;
  10. }
  11. require_once 'libraries/navigation/Nodes/Node_DatabaseChild.class.php';
  12. /**
  13. * Represents container node that carries children of a database
  14. *
  15. * @package PhpMyAdmin-Navigation
  16. */
  17. abstract class Node_DatabaseChild_Container extends Node_DatabaseChild
  18. {
  19. /**
  20. * Initialises the class by setting the common variables
  21. *
  22. * @param string $name An identifier for the new node
  23. * @param int $type Type of node, may be one of CONTAINER or OBJECT
  24. */
  25. public function __construct($name, $type = Node::OBJECT)
  26. {
  27. parent::__construct($name, $type);
  28. if ($GLOBALS['cfg']['NavigationTreeEnableGrouping']) {
  29. $this->separator = $GLOBALS['cfg']['NavigationTreeTableSeparator'];
  30. $this->separator_depth = (int)(
  31. $GLOBALS['cfg']['NavigationTreeTableLevel']
  32. );
  33. }
  34. }
  35. /**
  36. * Returns the type of the item represented by the node.
  37. *
  38. * @return string type of the item
  39. */
  40. protected function getItemType()
  41. {
  42. return 'group';
  43. }
  44. }