"Fossies" - the Fresh Open Source Software Archive

Member "phpMyAdmin-5.1.0-english/libraries/classes/Navigation/Nodes/NodeDatabaseChildContainer.php" (24 Feb 2021, 1076 Bytes) of package /linux/www/phpMyAdmin-5.1.0-english.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "NodeDatabaseChildContainer.php" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 5.0.4-english_vs_5.1.0-english.

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