![]() |
Antidot PHP API
version 0.16.0
##PHP API to simplify integration of Antidot components
|
Interface for encoding/decoding queries. More...
Public Member Functions | |
generate_parameters (AfsQuery $query) | |
Generate suitable parameters which can be used in URL. | |
generate_link (AfsQuery $query) | |
Convenient method to build link. | |
build_query (array $params) | |
Generate query object from array of parameters. |
Interface for encoding/decoding queries.
Encoded query is used to generate parameters suitable to build link for specific action.
Query is decoded from array of parameters. This array usually comes from $_GET
value.
For example:
shoes
.size
and color
facets.red
color.query
object from URL parameters, otherwise if you filter on the color only, you will get all red items. So you should initialize your query with: build_query | ( | array | $params | ) |
Generate query object from array of parameters.
$params | [in] array of parameters used to build query object. |
Implemented in AfsQueryCoder.
generate_link | ( | AfsQuery | $query | ) |
Convenient method to build link.
This method generally calls generate_parameters to build appropriate link.
$query | [in] AfsQuery used to generate appropriate link. |
Implemented in AfsQueryCoder.
generate_parameters | ( | AfsQuery | $query | ) |
Generate suitable parameters which can be used in URL.
$query | [in] query object to encode. |
Implemented in AfsQueryCoder.