PHP Class PMA\libraries\controllers\table\TableSearchController

Inheritance: extends PMA\libraries\controllers\TableController
Show file Open project: phpmyadmin/phpmyadmin Class Usage Examples

Protected Properties

Property Type Description
$url_query

Public Methods

Method Description
__construct ( string $searchType, string $url_query ) Constructor
changeTableInfoAction ( ) : void Change table info action
displaySelectionFormAction ( $datalabel = null ) : void Display selection form action
doSelectionAction ( ) : void Do selection action
findAction ( ) : void Find action
getColumnMinMax ( string $column ) : array Finds minimum and maximum value of a given column.
getColumnProperties ( integer $search_index, integer $column_index ) : array Provides a column's type, collation, operators list, and criteria value to display in table search form
getDataRowAction ( ) : void Get data row action
getReplacePreview ( integer $columnIndex, string $find, string $replaceWith, boolean $useRegex, string $charSet ) : string Returns HTML for previewing strings found and their replacements
indexAction ( ) : void Index action
rangeSearchAction ( ) : void Range search action
replace ( integer $columnIndex, string $find, string $replaceWith, boolean $useRegex, string $charSet ) : void Replaces a given string in a column with a give replacement
replaceAction ( ) : void Replace action
zoomSubmitAction ( string $dataLabel, string $goto ) : void Zoom submit action

Private Methods

Method Description
_buildSqlQuery ( ) : string Builds the sql search query from the post parameters
_generateWhereClause ( ) : string Generates the where clause for the SQL search query to be executed
_getEnumWhereClause ( mixed $criteriaValues, string $func_type ) : string Return the where clause in case column's type is ENUM.
_getGeomWhereClause ( mixed $criteriaValues, string $names, string $func_type, string $types, boolean $geom_func = null ) : string Return the where clause for a geometrical column.
_getRegexReplaceRows ( integer $columnIndex, string $find, string $replaceWith, string $charSet ) : array Finds and returns Regex pattern and their replacements
_getSubTabs ( ) : array Returns an array with necessary configurations to create sub-tabs in the table_select page.
_getWhereClause ( mixed $criteriaValues, string $names, string $types, string $func_type, boolean $unaryFlag, boolean $geom_func = null ) : string Return the where clause for query generation based on the inputs provided.
_loadTableInfo ( ) : void Gets all the columns of a table along with their types, collations and whether null or not.

Method Details

__construct() public method

Constructor
public __construct ( string $searchType, string $url_query )
$searchType string Search type
$url_query string URL query

changeTableInfoAction() public method

Change table info action
public changeTableInfoAction ( ) : void
return void

displaySelectionFormAction() public method

Display selection form action
public displaySelectionFormAction ( $datalabel = null ) : void
return void

doSelectionAction() public method

Do selection action
public doSelectionAction ( ) : void
return void

findAction() public method

Find action
public findAction ( ) : void
return void

getColumnMinMax() public method

Finds minimum and maximum value of a given column.
public getColumnMinMax ( string $column ) : array
$column string Column name
return array

getColumnProperties() public method

Provides a column's type, collation, operators list, and criteria value to display in table search form
public getColumnProperties ( integer $search_index, integer $column_index ) : array
$search_index integer Row number in table search form
$column_index integer Column index in ColumnNames array
return array Array containing column's properties

getDataRowAction() public method

Get data row action
public getDataRowAction ( ) : void
return void

getReplacePreview() public method

Returns HTML for previewing strings found and their replacements
public getReplacePreview ( integer $columnIndex, string $find, string $replaceWith, boolean $useRegex, string $charSet ) : string
$columnIndex integer index of the column
$find string string to find in the column
$replaceWith string string to replace with
$useRegex boolean to use Regex replace or not
$charSet string character set of the connection
return string HTML for previewing strings found and their replacements

indexAction() public method

Index action
public indexAction ( ) : void
return void

rangeSearchAction() public method

Range search action
public rangeSearchAction ( ) : void
return void

replace() public method

Replaces a given string in a column with a give replacement
public replace ( integer $columnIndex, string $find, string $replaceWith, boolean $useRegex, string $charSet ) : void
$columnIndex integer index of the column
$find string string to find in the column
$replaceWith string string to replace with
$useRegex boolean to use Regex replace or not
$charSet string character set of the connection
return void

replaceAction() public method

Replace action
public replaceAction ( ) : void
return void

zoomSubmitAction() public method

Zoom submit action
public zoomSubmitAction ( string $dataLabel, string $goto ) : void
$dataLabel string Data label
$goto string Goto
return void

Property Details

$url_query protected property

protected $url_query