class SavedSearches

Saved searches managing

Methods

__construct(array $config, Relation $relation)

Public constructor

setId(int|null $searchId)

Setter of id

int|null
getId()

Getter of id

setSearchName(string $searchName)

Setter of searchName

string
getSearchName()

Getter of searchName

setConfig(array $config)

Setter of config

array
getConfig()

Getter of config

setCriterias(array|string $criterias, bool $json = false)

Setter for criterias

array
getCriterias()

Getter for criterias

setUsername(string $username)

Setter for username

string
getUsername()

Getter for username

setDbname(string $dbname)

Setter for DB name

string
getDbname()

Getter for DB name

boolean
save()

Save the search

boolean
delete()

Delete the search

bool
load()

Load the current search from an id.

array
getList(array $wheres = [])

Get the list of saved searches of a user on a DB

Details

at line 65
__construct(array $config, Relation $relation)

Public constructor

Parameters

array $config Global configuration
Relation $relation Relation instance

at line 78
SavedSearches setId(int|null $searchId)

Setter of id

Parameters

int|null $searchId Id of search

Return Value

SavedSearches

at line 94
int|null getId()

Getter of id

Return Value

int|null

at line 106
SavedSearches setSearchName(string $searchName)

Setter of searchName

Parameters

string $searchName Saved search name

Return Value

SavedSearches

at line 117
string getSearchName()

Getter of searchName

Return Value

string

at line 129
SavedSearches setConfig(array $config)

Setter of config

Parameters

array $config Global configuration

Return Value

SavedSearches

at line 140
array getConfig()

Getter of config

Return Value

array

at line 153
SavedSearches setCriterias(array|string $criterias, bool $json = false)

Setter for criterias

Parameters

array|string $criterias Criterias of saved searches
bool $json Criterias are in JSON format

Return Value

SavedSearches

at line 204
array getCriterias()

Getter for criterias

Return Value

array

at line 216
SavedSearches setUsername(string $username)

Setter for username

Parameters

string $username Username

Return Value

SavedSearches

at line 227
string getUsername()

Getter for username

Return Value

string

at line 239
SavedSearches setDbname(string $dbname)

Setter for DB name

Parameters

string $dbname DB name

Return Value

SavedSearches

at line 250
string getDbname()

Getter for DB name

Return Value

string

at line 260
boolean save()

Save the search

Return Value

boolean

at line 361
boolean delete()

Delete the search

Return Value

boolean

at line 389
bool load()

Load the current search from an id.

Return Value

bool Success

at line 433
array getList(array $wheres = [])

Get the list of saved searches of a user on a DB

Parameters

array $wheres List of filters

Return Value

array List of saved searches or empty array on failure