PHP Class PMA\libraries\navigation\nodes\NodeDatabase

Inheritance: extends Node
Show file Open project: phpmyadmin/phpmyadmin Class Usage Examples

Protected Properties

Property Type Description
$hiddenCount integer The number of hidden items in this database

Public Methods

Method Description
__construct ( string $name, integer $type = Node::OBJECT, boolean $is_group = false ) Initialises the class
getData ( string $type, integer $pos, string $searchClause = '' ) : array Returns the names of children of type $type present inside this container This method is overridden by the PMA\libraries\navigation\nodes\NodeDatabase and PMA\libraries\navigation\nodes\NodeTable classes
getHiddenCount ( ) : integer Returns the number of hidden items in this database
getHiddenItems ( string $type ) : array Return list of hidden items of given type
getHtmlForControlButtons ( ) : String Returns HTML for control buttons displayed infront of a node
getPresence ( string $type = '', string $searchClause = '', boolean $singleItem = false ) : integer Returns the number of children of type $type present inside this container This method is overridden by the PMA\libraries\navigation\nodes\NodeDatabase and PMA\libraries\navigation\nodes\NodeTable classes
setHiddenCount ( integer $count ) : void Sets the number of hidden items in this database

Private Methods

Method Description
_getEventCount ( string $searchClause, boolean $singleItem ) : integer Returns the number of events present inside this database
_getEvents ( integer $pos, string $searchClause ) : array Returns the list of events inside this database
_getFunctionCount ( string $searchClause, boolean $singleItem ) : integer Returns the number of functions present inside this database
_getFunctions ( integer $pos, string $searchClause ) : array Returns the list of functions inside this database
_getProcedureCount ( string $searchClause, boolean $singleItem ) : integer Returns the number of procedures present inside this database
_getProcedures ( integer $pos, string $searchClause ) : array Returns the list of procedures inside this database
_getRoutines ( string $routineType, integer $pos, string $searchClause ) : array Returns the list of procedures or functions inside this database
_getTableCount ( string $searchClause, boolean $singleItem ) : integer Returns the number of tables present inside this database
_getTableOrViewCount ( string $which, string $searchClause, boolean $singleItem ) : integer Returns the number of tables or views present inside this database
_getTables ( integer $pos, string $searchClause ) : array Returns the list of tables inside this database
_getTablesOrViews ( string $which, integer $pos, string $searchClause ) : array Returns the list of tables or views inside this database
_getViewCount ( string $searchClause, boolean $singleItem ) : integer Returns the number of views present inside this database
_getViews ( integer $pos, string $searchClause ) : array Returns the list of views inside this database
_getWhereClauseForSearch ( string $searchClause, boolean $singleItem, string $columnName ) : string Returns the WHERE clause for searching inside a database

Method Details

__construct() public method

Initialises the class
public __construct ( string $name, integer $type = Node::OBJECT, boolean $is_group = false )
$name string An identifier for the new node
$type integer Type of node, may be one of CONTAINER or OBJECT
$is_group boolean Whether this object has been created while grouping nodes

getData() public method

Returns the names of children of type $type present inside this container This method is overridden by the PMA\libraries\navigation\nodes\NodeDatabase and PMA\libraries\navigation\nodes\NodeTable classes
public getData ( string $type, integer $pos, string $searchClause = '' ) : array
$type string The type of item we are looking for ('tables', 'views', etc)
$pos integer The offset of the list within the results
$searchClause string A string used to filter the results of the query
return array

getHiddenCount() public method

Returns the number of hidden items in this database
public getHiddenCount ( ) : integer
return integer hidden item count

getHiddenItems() public method

Return list of hidden items of given type
public getHiddenItems ( string $type ) : array
$type string The type of items we are looking for ('table', 'function', 'group', etc.)
return array Array containing hidden items of given type

getHtmlForControlButtons() public method

Returns HTML for control buttons displayed infront of a node
public getHtmlForControlButtons ( ) : String
return String HTML for control buttons

getPresence() public method

Returns the number of children of type $type present inside this container This method is overridden by the PMA\libraries\navigation\nodes\NodeDatabase and PMA\libraries\navigation\nodes\NodeTable classes
public getPresence ( string $type = '', string $searchClause = '', boolean $singleItem = false ) : integer
$type string The type of item we are looking for ('tables', 'views', etc)
$searchClause string A string used to filter the results of the query
$singleItem boolean Whether to get presence of a single known item or false in none
return integer

setHiddenCount() public method

Sets the number of hidden items in this database
public setHiddenCount ( integer $count ) : void
$count integer hidden item count
return void

Property Details

$hiddenCount protected property

The number of hidden items in this database
protected int $hiddenCount
return integer