MetaSearchService
in package
Meta Search Service
Tags
Table of Contents
Properties
- $cacheTimeout : int
- $pageSize : int
- $provider : MetaSearchProviderInterface|null
- $results : array<string|int, MetaSearchResultInterface>|null
- $route : string|null
- $totalCount : int|null
Methods
- __construct() : mixed
- getLinkTarget() : string|null
- Get a link target depending on URL, external URLs should be opened in a new window
- getResults() : array<string|int, MetaSearchResultInterface>
- Get searched results
- getTotal() : int
- Get number of results
- getUrl() : string
- Get URL to all results filtered with keyword
- hasResults() : bool
- Has at least one searched result
- isSearched() : bool
- Check if a searching has been done
- search() : void
- Run search process and cache results
Properties
$cacheTimeout
public
int
$cacheTimeout
= 180
$pageSize
public
int
$pageSize
= 4
$provider
protected
MetaSearchProviderInterface|null
$provider
= null
$results
protected
array<string|int, MetaSearchResultInterface>|null
$results
= null
$route
protected
string|null
$route
= null
Route to the searching page with all filters
$totalCount
protected
int|null
$totalCount
= null
Methods
__construct()
public
__construct(MetaSearchProviderInterface $provider) : mixed
Parameters
- $provider : MetaSearchProviderInterface
getLinkTarget()
Get a link target depending on URL, external URLs should be opened in a new window
public
getLinkTarget([string|null $url = null ]) : string|null
Parameters
- $url : string|null = null
Return values
string|nullgetResults()
Get searched results
public
getResults() : array<string|int, MetaSearchResultInterface>
Return values
array<string|int, MetaSearchResultInterface>getTotal()
Get number of results
public
getTotal() : int
Return values
intgetUrl()
Get URL to all results filtered with keyword
public
getUrl() : string
Return values
stringhasResults()
Has at least one searched result
public
hasResults() : bool
Return values
boolisSearched()
Check if a searching has been done
public
isSearched() : bool
Return values
boolsearch()
Run search process and cache results
public
search() : void