blob: 704e0e12b445d24a24e5e5274347928a7dc82281 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<?php
namespace Elastica\Transport;
use Elastica\JSON;
use Elastica\Request;
use Elastica\Response;
/**
* Elastica Null Transport object
*
* @package Elastica
* @author James Boehmer <james.boehmer@jamesboehmer.com>
*/
class Null extends AbstractTransport
{
/**
* Null transport.
*
* @param \Elastica\Request $request
* @param array $params Hostname, port, path, ...
* @return \Elastica\Response Response empty object
*/
public function exec(Request $request, array $params)
{
$response = array(
"took" => 0,
"timed_out" => FALSE,
"_shards" => array(
"total" => 0,
"successful" => 0,
"failed" => 0
),
"hits" => array(
"total" => 0,
"max_score" => NULL,
"hits" => array()
),
"params" => $params
);
return new Response(JSON::stringify($response));
}
}
|