include/SugarSearchEngine/Elastic/Elastica/Request.php
Elastica Request object
- Author
- Nicolas Ruflin
- Category
- Xodoa
- Package
- Elastica
\Elastica_Request
Package: Elastica
Elastica Request object
- Author
- Nicolas Ruflin
- Category
- Xodoa
Constants
Properties
Methods
__construct(
\Elastica_Client $client, string $path, string $method, array $data
=
array()
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$client | \Elastica_Client | |
$path | string | Request path |
$method | string | Request method (use const's) |
$data | array | Data array |
getConfig(
string $key
=
''
)
:
array | string
Returns a specific config key or the whole config array if not set
Parameters
Returns
Name | Type | Description |
---|---|---|
$key | string | Config key |
Type | Description |
---|---|
array | string | Config value |
getTransport(
)
:
\Elastica_Transport_Abstract
Returns an instance of the transport type
Returns
Throws
Type | Description |
---|---|
\Elastica_Transport_Abstract | Transport object |
Exception | Description |
---|---|
\Elastica_Exception_Invalid | If invalid transport type |
send(
)
:
\Elastica_Response
Sends request to server
Returns
Type | Description |
---|---|
\Elastica_Response | Response object |
setData(
array $data
)
:
void
Sets the request data
Parameters
Name | Type | Description |
---|---|---|
$data | array | Request data |
setMethod(
string $method
)
:
\Elastica_Request
Sets the request method. Use one of the for consts
Parameters
Returns
Name | Type | Description |
---|---|---|
$method | string | Request method |
Type | Description |
---|---|
\Elastica_Request | Current object |
setPath(
string $path
)
:
\Elastica_Request
Sets the request path
Parameters
Returns
Name | Type | Description |
---|---|---|
$path | string | Request path |
Type | Description |
---|---|
\Elastica_Request | Current object |