SearchViewModel
extends ArcheModel
in package
Description of SearchViewModel
Tags
Table of Contents
Properties
- $binarySearch : mixed
- $config : mixed
- $drupalDb : mixed
- $limit : mixed
- $namespace : mixed
- $offset : mixed
- $order : mixed
- $orderby : mixed
- $orderby_column : mixed
- $repoDb : mixed
- $log : mixed
- $searchCfg : mixed
- $siteLang : mixed
- $sqlParams : mixed
- $sqlResult : mixed
Methods
- __construct() : mixed
- getVcr() : array<string|int, mixed>
- getViewData() : array<string|int, mixed>
- get the views data
- setSqlTimeout() : mixed
- Set the sql execution max time
- closeDBConnection() : mixed
- ordering() : object
- Create the order values for the sql
- orderingByFields() : object
- reOrderResult() : array<string|int, mixed>
- Reorder the result because of the easyrdf
- setActiveConnection() : mixed
- Allow the DB connection
- sortAssociativeArrayByKey() : array<string|int, mixed>
- Reorder the Easyrdf result because the dataset is already filtered by the API But the actual order is not possible from the easyrdf, so we have to sort is manually.
- countTypesFromDB() : int
- Count the types defined from the search input fields
- countWordsFromDb() : int
- Count the words + rdf:type + years defined from the search input fields
- countYearsFromDb() : int
- COunt the years + rdf:type selected values
- formatTypeFilter() : string
- formatWordsFilter() : string
- formatYearsArrayFilter() : string
- formatYearsFilter() : string
- Change the years format for the sql query
- getTypesFromDB() : type
- Get the type + year resources from the DB
- getWordsFromDB() : type
- Collect the words and/or type/years keywords
- getYearsFromDB() : type
- Get the years from the database
- initPaging() : mixed
- setUpPayload() : void
Properties
$binarySearch
protected
mixed
$binarySearch
= false
$config
protected
mixed
$config
$drupalDb
protected
mixed
$drupalDb
$limit
protected
mixed
$limit
$namespace
protected
mixed
$namespace
$offset
protected
mixed
$offset
$order
protected
mixed
$order
$orderby
protected
mixed
$orderby
$orderby_column
protected
mixed
$orderby_column
$repoDb
protected
mixed
$repoDb
$log
private
mixed
$log
$searchCfg
private
mixed
$searchCfg
$siteLang
private
mixed
$siteLang
$sqlParams
private
mixed
$sqlParams
$sqlResult
private
mixed
$sqlResult
Methods
__construct()
public
__construct() : mixed
getVcr()
public
getVcr([array<string|int, mixed> $params = [] ]) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed> = []
Return values
array<string|int, mixed>getViewData()
get the views data
public
getViewData([array<string|int, mixed> $params = [] ]) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed> = []
Return values
array<string|int, mixed>setSqlTimeout()
Set the sql execution max time
public
setSqlTimeout([string $timeout = '7000' ]) : mixed
Parameters
- $timeout : string = '7000'
closeDBConnection()
protected
closeDBConnection() : mixed
ordering()
Create the order values for the sql
protected
ordering([string $orderby = "titleasc" ]) : object
Parameters
- $orderby : string = "titleasc"
Return values
objectorderingByFields()
protected
orderingByFields(array<string|int, mixed> $valuesAndFields[, string $orderby = "titleasc" ]) : object
Parameters
- $valuesAndFields : array<string|int, mixed>
- $orderby : string = "titleasc"
Return values
objectreOrderResult()
Reorder the result because of the easyrdf
protected
reOrderResult(array<string|int, mixed> $data, string $order) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
- $order : string
Return values
array<string|int, mixed>setActiveConnection()
Allow the DB connection
protected
setActiveConnection() : mixed
sortAssociativeArrayByKey()
Reorder the Easyrdf result because the dataset is already filtered by the API But the actual order is not possible from the easyrdf, so we have to sort is manually.
protected
sortAssociativeArrayByKey(array<string|int, mixed> $array, string $key, string $direction) : array<string|int, mixed>
.
Parameters
- $array : array<string|int, mixed>
- $key : string
- $direction : string
Return values
array<string|int, mixed>countTypesFromDB()
Count the types defined from the search input fields
private
countTypesFromDB() : int
Return values
intcountWordsFromDb()
Count the words + rdf:type + years defined from the search input fields
private
countWordsFromDb() : int
Return values
intcountYearsFromDb()
COunt the years + rdf:type selected values
private
countYearsFromDb() : int
Return values
intformatTypeFilter()
private
formatTypeFilter([string $key = "type" ]) : string
Parameters
- $key : string = "type"
Return values
stringformatWordsFilter()
private
formatWordsFilter() : string
Return values
stringformatYearsArrayFilter()
private
formatYearsArrayFilter() : string
Return values
stringformatYearsFilter()
Change the years format for the sql query
private
formatYearsFilter() : string
Return values
stringgetTypesFromDB()
Get the type + year resources from the DB
private
getTypesFromDB() : type
Return values
typegetWordsFromDB()
Collect the words and/or type/years keywords
private
getWordsFromDB() : type
Return values
typegetYearsFromDB()
Get the years from the database
private
getYearsFromDB() : type
Return values
typeinitPaging()
private
initPaging() : mixed
setUpPayload()
private
setUpPayload() : void