1 | <?php |
||
16 | class PullParsingSearchService implements SearchServiceInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var SearchAPI2\ResultSetPullParser |
||
20 | */ |
||
21 | protected $pullParser; |
||
22 | |||
23 | /** |
||
24 | * @var SearchAPI2\SearchServiceInterface |
||
25 | */ |
||
26 | protected $searchAPI2; |
||
27 | |||
28 | /** |
||
29 | * @var IriGeneratorInterface |
||
30 | */ |
||
31 | protected $eventIriGenerator; |
||
32 | |||
33 | /** |
||
34 | * @var IriGeneratorInterface |
||
35 | */ |
||
36 | protected $placeIriGenerator; |
||
37 | |||
38 | /** |
||
39 | * @var LoggerInterface |
||
40 | */ |
||
41 | protected $resultParserLogger; |
||
42 | |||
43 | /** |
||
44 | * @var bool |
||
45 | */ |
||
46 | protected $includePrivateItems; |
||
47 | |||
48 | /** |
||
49 | * @param SearchAPI2\SearchServiceInterface $search |
||
50 | * @param IriGeneratorInterface $eventIriGenerator |
||
51 | * @param IriGeneratorInterface $placeIriGenerator |
||
52 | * @param LoggerInterface|null $resultParserLogger |
||
53 | */ |
||
54 | public function __construct( |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | public function search($query, $limit = 30, $start = 0, $sort = null) |
||
79 | |||
80 | /** |
||
81 | * @return PullParsingSearchService |
||
82 | */ |
||
83 | public function doNotIncludePrivateItems() |
||
89 | |||
90 | /** |
||
91 | * Finds items matching an arbitrary query. |
||
92 | * |
||
93 | * @param string $query |
||
94 | * An arbitrary query. |
||
95 | * @param int $limit |
||
96 | * How many items to retrieve. |
||
97 | * @param int $start |
||
98 | * Offset to start from. |
||
99 | * @param string $sort |
||
100 | * Sorting to use. |
||
101 | * |
||
102 | * @return \Guzzle\Http\Message\Response |
||
103 | */ |
||
104 | private function executeSearch($query, $limit, $start, $sort = null) |
||
134 | |||
135 | /** |
||
136 | * @return SearchAPI2\ResultSetPullParser |
||
137 | */ |
||
138 | protected function getPullParser() |
||
150 | } |
||
151 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: