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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
<?php
/**
*
* @author Christian Doebler <christian.doebler@netways.de>
*
*/
interface IcingaApiSearchInterface {
/**
* sets the connection object
*
* @param IcingaApiConnectionInterface $object connection object
* @return void
* @author Christian Doebler <christian.doebler@netways.de>
*/
public function setConnectionObject(IcingaApiConnectionInterface &$object);
/**
* sets the type of return data
*
* @param string $type type of data to return (object, array)
* @return IcingaApiSearchInterface
* @author Christian Doebler <christian.doebler@netways.de>
*/
public function setResultType ($type);
/**
* sets the type of search
*
* @param string $type search type
* @return IcingaApiSearchInterface
* @author Christian Doebler <christian.doebler@netways.de>
*/
public function setSearchType ($type);
/**
* sets result columns for query
*
* @param mixed $columns array of columns or column as string
* @return IcingaApiSearchInterface
* @author Christian Doebler <christian.doebler@netways.de>
*/
// public function setResultColumns ($columns);
/**
* sets the search target
*
* @param string $target target to search for
* @return IcingaApiSearchInterface
* @author Christian Doebler <christian.doebler@netways.de>
*/
public function setSearchTarget ($target);
/**
* sets search filter(s)
* @param mixed $filter filter key or associative array of key-value pairs defining filters
* @param mixed $value value to filter for
* @return IcingaApiSearchInterface
* @author Christian Doebler <christian.doebler@netways.de>
*/
public function setSearchFilter ($filter, $value = false, $defaultMatch = IcingaApi::MATCH_EXACT);
/**
* sets custom search filter(s) to append to end of filter statement
* @param mixed $statement filter statement
* @param mixed $searchAggregator search aggregator to use for appending statement to filter
* @return IcingaApiSearchInterface
* @author Christian Doebler <christian.doebler@netways.de>
*/
public function setSearchFilterAppendix ($statement, $searchAggregator = self::SEARCH_AND);
/**
* sets columns to group query by
* @param mixed $columns array of columns or string of one or more comma-separated columns to group by
* @return IcingaApiSearchInterface
* @author Christian Doebler <christian.doebler@netways.de>
*/
public function setSearchGroup ($columns);
/**
* sets columns and direction to sort by
* @param mixed $column array of columns or string of one or more comma-separated columns including optional directions to sort by
* @param string $direction sort direction (asc|desc; optional)
* @return IcingaApiSearchInterface
* @author Christian Doebler <christian.doebler@netways.de>
*/
public function setSearchOrder ($column, $direction = false);
/**
* sets limits for query
* @param mixed $start start row as integer or string containing start and length separated by a comma (NOTE: if $length is missing $start will use as $length instead!)
* @param integer $length number of rows to query for (optional)
* @return IcingaApiSearchInterface
* @author Christian Doebler <christian.doebler@netways.de>
*/
public function setSearchLimit ($start, $length = false);
/**
* set source to find current contact
* @param string $source source of contact
* @return IcingaApiSearchInterface
* @author Christian Doebler <christian.doebler@netways.de>
*/
public function setContactSource ($source);
/**
* sets the current contact for further filtering
* @param string $contact contact to use as filter
* @return IcingaApiSearchInterface
* @author Christian Doebler <christian.doebler@netways.de>
*/
public function setContact ($contact);
/**
* check available search data
*
* @param void
* @return boolean true if search data is valid otherwise false
* @author Christian Doebler <christian.doebler@netways.de>
*/
public function searchValid ();
}
?>
|