Search.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2020 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of the MIT License.
7  *
8  * See the LICENSE file distributed with this work for
9  * additional information.
10  */
11 namespace wcmf\lib\search;
12 
15 
16 /**
17  * Search implementations are used to search entity objects.
18  *
19  * @author ingo herwig <ingo@wemove.com>
20  */
21 interface Search {
22 
23  /**
24  * Check if the search word is valid
25  * @param $word
26  * @return True, if valid, error message else
27  */
28  public function check($word);
29 
30  /**
31  * Search for searchTerm
32  * @param $searchTerm
33  * @param $pagingInfo A PagingInfo instance (optional, default: _null_)
34  * @param $createSummary Boolean whether to create a summary or not (optional, default: _true_)
35  * @return Associative array with object ids as keys and
36  * associative array with keys 'oid', 'score', 'summary' as value
37  */
38  public function find($searchTerm, PagingInfo $pagingInfo=null, $createSummary=true);
39 
40  /**
41  * Check if the instance object is searchable
42  * (defined by the property 'isSearchable')
43  * @param $obj PersistentObject instance
44  * @return Boolean whether the object is searchable or not
45  */
46  public function isSearchable(PersistentObject $obj);
47 }
48 ?>
isSearchable(PersistentObject $obj)
Check if the instance object is searchable (defined by the property 'isSearchable')
Search implementations are used to search entity objects.
Definition: Search.php:21
Search related interfaces and classes.
Definition: namespaces.php:78
PagingInfo contains information about a paged list.
Definition: PagingInfo.php:18
PersistentObject defines the interface of all persistent objects.
check($word)
Check if the search word is valid.
find($searchTerm, PagingInfo $pagingInfo=null, $createSummary=true)
Search for searchTerm.