-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSearchManagerInterface.php
More file actions
40 lines (35 loc) · 1.13 KB
/
Copy pathSearchManagerInterface.php
File metadata and controls
40 lines (35 loc) · 1.13 KB
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
<?php
/*
* This file is part of the Klipper package.
*
* (c) François Pluchino <francois.pluchino@klipper.dev>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Klipper\Component\Search;
use Klipper\Component\Search\Exception\InvalidArgumentException;
/**
* @author François Pluchino <francois.pluchino@klipper.dev>
*/
interface SearchManagerInterface
{
/**
* Search in one object.
*
* @param string $object The object
* @param string $query The query
* @param string[] $queryFields The query fields
*
* @throws InvalidArgumentException When the object doesn't exist
*/
public function searchByObject(string $object, string $query, array $queryFields = []): SearchResultInterface;
/**
* Search in objects.
*
* @param string $query The query
* @param string[] $objects The objects
* @param string[] $queryFields The query fields
*/
public function search(string $query, array $objects = [], array $queryFields = []): SearchResultsInterface;
}