PHP Class PMA\libraries\SavedSearches

Mostrar archivo Open project: phpmyadmin/phpmyadmin Class Usage Examples

Public Methods

Method Description
__construct ( array $config ) Public constructor
delete ( ) : boolean Delete the search
getConfig ( ) : array Getter of config
getCriterias ( ) : array Getter for criterias
getDbname ( ) : string Getter for DB name
getId ( ) : integer | null Getter of id
getList ( array $wheres = [] ) : array Get the list of saved searches of a user on a DB
getSearchName ( ) : string Getter of searchName
getUsername ( ) : string Getter for username
load ( ) : boolean Load the current search from an id.
save ( ) : boolean Save the search
setConfig ( array $config ) : static Setter of config
setCriterias ( array | string $criterias, boolean $json = false ) : static Setter for criterias
setDbname ( string $dbname ) : static Setter for DB name
setId ( integer | null $searchId ) : static Setter of id
setSearchName ( string $searchName ) : static Setter of searchName
setUsername ( string $username ) : static Setter for username

Method Details

__construct() public method

Public constructor
public __construct ( array $config )
$config array Global configuration

delete() public method

Delete the search
public delete ( ) : boolean
return boolean

getConfig() public method

Getter of config
public getConfig ( ) : array
return array

getCriterias() public method

Getter for criterias
public getCriterias ( ) : array
return array

getDbname() public method

Getter for DB name
public getDbname ( ) : string
return string

getId() public method

Getter of id
public getId ( ) : integer | null
return integer | null

getList() public method

Get the list of saved searches of a user on a DB
public getList ( array $wheres = [] ) : array
$wheres array List of filters
return array List of saved searches or empty array on failure

getSearchName() public method

Getter of searchName
public getSearchName ( ) : string
return string

getUsername() public method

Getter for username
public getUsername ( ) : string
return string

load() public method

Load the current search from an id.
public load ( ) : boolean
return boolean Success

save() public method

Save the search
public save ( ) : boolean
return boolean

setConfig() public method

Setter of config
public setConfig ( array $config ) : static
$config array Global configuration
return static

setCriterias() public method

Setter for criterias
public setCriterias ( array | string $criterias, boolean $json = false ) : static
$criterias array | string Criterias of saved searches
$json boolean Criterias are in JSON format
return static

setDbname() public method

Setter for DB name
public setDbname ( string $dbname ) : static
$dbname string DB name
return static

setId() public method

Setter of id
public setId ( integer | null $searchId ) : static
$searchId integer | null Id of search
return static

setSearchName() public method

Setter of searchName
public setSearchName ( string $searchName ) : static
$searchName string Saved search name
return static

setUsername() public method

Setter for username
public setUsername ( string $username ) : static
$username string Username
return static