Search.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2015 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  * @return Associative array with object ids as keys and
35  * associative array with keys 'oid', 'score', 'summary' as value
36  */
37  public function find($searchTerm, PagingInfo $pagingInfo=null);
38 
39  /**
40  * Check if the instance object is searchable
41  * (defined by the property 'is_searchable')
42  * @param $obj PersistentObject instance
43  * @return Boolean whether the object is searchable or not
44  */
45  public function isSearchable(PersistentObject $obj);
46 }
47 ?>
Search related interfaces and classes.
Definition: namespaces.php:78
find($searchTerm, PagingInfo $pagingInfo=null)
Search for searchTerm.
isSearchable(PersistentObject $obj)
Check if the instance object is searchable (defined by the property 'is_searchable') ...
check($word)
Check if the search word is valid.
PagingInfo contains information about a paged list.
Definition: PagingInfo.php:18
Search implementations are used to search entity objects.
Definition: Search.php:21
PersistentObject defines the interface of all persistent objects.