vBulletin v6.0.4

vB_Api_Search extends vB_Api
in package

vB_Api_Search

Tags
access

public

Table of Contents

Constants

FILTER_CHANNELAGE  = 'channelAge'
FILTER_DATEALL  = 'all'
FILTER_FOLLOW  = 'follow'
FILTER_FOLLOWING_ALL  = 'followAll'
FILTER_FOLLOWING_BOTH  = 'followBoth'
FILTER_FOLLOWING_CHANNEL  = 'followChannel'
FILTER_FOLLOWING_CONTENT  = 'followContent'
FILTER_FOLLOWING_USERS  = 'followMembers'
FILTER_LASTDAY  = 'lastDay'
FILTER_LASTMONTH  = 'lastMonth'
FILTER_LASTVISIT  = 'lastVisit'
FILTER_LASTWEEK  = 'lastWeek'
FILTER_LASTYEAR  = 'lastYear'
FILTER_MARKED_READ  = 'read'
FILTER_MARKED_UNREAD  = 'unread'
FILTER_SHOW_EVENT  = 'vBForum_Event'
FILTER_SHOW_GALLERY  = 'vBForum_Gallery'
FILTER_SHOW_LINK  = 'vBForum_Link'
FILTER_SHOW_POLL  = 'vBForum_Poll'
FILTER_SHOW_TEXT  = 'vBForum_Text'
FILTER_SHOW_VIDEO  = 'vBForum_Video'
FILTER_STARTER_ONLY  = 'starter_only'
FILTER_TOPICAGE  = 'topicAge'
FILTER_VIEW_ACTIVITY  = 'activity'
FILTER_VIEW_CONVERSATION_STREAM  = 'conversation_stream'
FILTER_VIEW_CONVERSATION_THREAD  = 'conversation_thread'
FILTER_VIEW_CONVERSATION_THREAD_SEARCH  = 'conversation_thread_search'
FILTER_VIEW_TOPIC  = 'topic'
IGNORE_CACHE  = \false
SEARCH_TYPE_SYSTEM  = 0
SEARCH_TYPE_USER  = 1

Methods

__serialize()  : array<string|int, mixed>
__sleep()  : array<string|int, mixed>
__unserialize()  : void
__wakeup()  : void
callNamed()  : The
Call the given api function by name with a named arguments list.
checkApiState()  : mixed
This method checks whether the API method is enabled.
clearCache()  : mixed
Clears all previously loaded API objects.
get_all_bad_words()  : mixed
get_bad_words()  : mixed
get_good_words()  : mixed
getApiClassName()  : mixed
getCacheTTL()  : int
Returns the cache ttl in seconds
getChannels()  : array<string|int, mixed>
Returns the Channel structure
getChannelTopics()  : array<string|int, mixed>
Very similar to getInitialResults(), but meant for use by channeldisplay template & activity/get requests.
getInfo()  : mixed
getInitialNodes()  : array<string|int, mixed>
Search for nodeids and returns the resultid as well as the page value
getInitialResults()  : array<string|int, mixed>
Search for nodes and returns the resultid as well as the page value
getMoreNodes()  : array<string|int, mixed>
Get the node_ids from a search resultId
getMoreResults()  : array<string|int, mixed>
Get the nodes from a search resultId
getPageNumber()  : int
Get the page number where the specified node is at on the node list.
getSearchableContentTypes()  : mixed
getSearchResult()  : int
Search for nodes
instance()  : vB_Api
Returns an instance of the API object which translates exceptions to an array Use this method for API clients.
instanceInternal()  : vB_Api
Returns an instance of the API object which doesn't handle exceptions This should only be used in other API objects, not for clients of the API
is_index_word()  : mixed
map_vb4_input_to_vb5()  : string
Returns vb5 api method name.
map_vb5_errors_to_vb4()  : mixed
Alters the error array in any way necessary to interface correctly with vb4.
map_vb5_output_to_vb4()  : mixed
Alters the output array in any way necessary to interface correctly with vb4.

Constants

FILTER_CHANNELAGE

public mixed FILTER_CHANNELAGE = 'channelAge'

FILTER_DATEALL

public mixed FILTER_DATEALL = 'all'

FILTER_FOLLOW

public mixed FILTER_FOLLOW = 'follow'

FILTER_FOLLOWING_ALL

public mixed FILTER_FOLLOWING_ALL = 'followAll'

FILTER_FOLLOWING_BOTH

public mixed FILTER_FOLLOWING_BOTH = 'followBoth'

FILTER_FOLLOWING_CHANNEL

public mixed FILTER_FOLLOWING_CHANNEL = 'followChannel'

FILTER_FOLLOWING_CONTENT

public mixed FILTER_FOLLOWING_CONTENT = 'followContent'

FILTER_FOLLOWING_USERS

public mixed FILTER_FOLLOWING_USERS = 'followMembers'

FILTER_LASTDAY

public mixed FILTER_LASTDAY = 'lastDay'

FILTER_LASTMONTH

public mixed FILTER_LASTMONTH = 'lastMonth'

FILTER_LASTVISIT

public mixed FILTER_LASTVISIT = 'lastVisit'

FILTER_LASTWEEK

public mixed FILTER_LASTWEEK = 'lastWeek'

FILTER_LASTYEAR

public mixed FILTER_LASTYEAR = 'lastYear'

FILTER_MARKED_READ

public mixed FILTER_MARKED_READ = 'read'

FILTER_MARKED_UNREAD

public mixed FILTER_MARKED_UNREAD = 'unread'

FILTER_SHOW_EVENT

public mixed FILTER_SHOW_EVENT = 'vBForum_Event'
public mixed FILTER_SHOW_GALLERY = 'vBForum_Gallery'
public mixed FILTER_SHOW_LINK = 'vBForum_Link'

FILTER_SHOW_POLL

public mixed FILTER_SHOW_POLL = 'vBForum_Poll'

FILTER_SHOW_TEXT

public mixed FILTER_SHOW_TEXT = 'vBForum_Text'

FILTER_SHOW_VIDEO

public mixed FILTER_SHOW_VIDEO = 'vBForum_Video'

FILTER_STARTER_ONLY

public mixed FILTER_STARTER_ONLY = 'starter_only'

FILTER_TOPICAGE

public mixed FILTER_TOPICAGE = 'topicAge'

FILTER_VIEW_ACTIVITY

public mixed FILTER_VIEW_ACTIVITY = 'activity'

FILTER_VIEW_CONVERSATION_STREAM

public mixed FILTER_VIEW_CONVERSATION_STREAM = 'conversation_stream'

FILTER_VIEW_CONVERSATION_THREAD

public mixed FILTER_VIEW_CONVERSATION_THREAD = 'conversation_thread'
public mixed FILTER_VIEW_CONVERSATION_THREAD_SEARCH = 'conversation_thread_search'

FILTER_VIEW_TOPIC

public mixed FILTER_VIEW_TOPIC = 'topic'

IGNORE_CACHE

public mixed IGNORE_CACHE = \false

SEARCH_TYPE_SYSTEM

public mixed SEARCH_TYPE_SYSTEM = 0

SEARCH_TYPE_USER

public mixed SEARCH_TYPE_USER = 1

Methods

__serialize()

public __serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

__sleep()

public __sleep() : array<string|int, mixed>
Return values
array<string|int, mixed>

__unserialize()

public __unserialize(array<string|int, mixed> $serialized) : void
Parameters
$serialized : array<string|int, mixed>

callNamed()

Call the given api function by name with a named arguments list.

public callNamed() : The

Used primarily to translate REST requests into API calls.

Return values
The

return of the method or an error if the method doesn't exist, or is static, a constructor or destructor, or otherwise shouldn't be callable as and API method. It is also an error if the value of a paramater is not provided and that parameter doesn't have a default value.

checkApiState()

This method checks whether the API method is enabled.

public checkApiState(mixed $method) : mixed

For extensions check make sure $controller property is already set.

Parameters
$method : mixed

clearCache()

Clears all previously loaded API objects.

public static clearCache() : mixed

Intended for use in tests where the loading pattern can cause issues with objects that cache thier own data.

get_all_bad_words()

public static get_all_bad_words() : mixed

get_bad_words()

public static get_bad_words() : mixed

get_good_words()

public static get_good_words() : mixed

getApiClassName()

public static getApiClassName(mixed $controller) : mixed
Parameters
$controller : mixed

getCacheTTL()

Returns the cache ttl in seconds

public static getCacheTTL() : int
Return values
int

time in seconds

getChannels()

Returns the Channel structure

public getChannels([mixed $flat = false ][, mixed $queryOptions = ['exclude_categories' => false, 'include_protected' => false, 'exclude_subtrees' => []] ][, mixed $skipcache = false ][, mixed $topLevelChannel = 0 ]) : array<string|int, mixed>
Parameters
$flat : mixed = false
$queryOptions : mixed = ['exclude_categories' => false, 'include_protected' => false, 'exclude_subtrees' => []]
$skipcache : mixed = false
$topLevelChannel : mixed = 0
Return values
array<string|int, mixed>

channel structure

getChannelTopics()

Very similar to getInitialResults(), but meant for use by channeldisplay template & activity/get requests.

public getChannelTopics(string|array<string|int, mixed> $search_json[, int $perpage = false ][, int $pagenumber = false ][, bool $skipCount = false ]) : array<string|int, mixed>

Handles pagination differently and skips two-pass cache.

Parameters
$search_json : string|array<string|int, mixed>

list of parameters that can be encoded in a json string

$perpage : int = false

pagination - the number of results per page

$pagenumber : int = false

pagination - the page number

$skipCount : bool = false
Return values
array<string|int, mixed>

results array of node information for $pagenumber totalcount integer total (not just $pagenumber) number of topics

getInfo()

public getInfo(mixed $resultId) : mixed
Parameters
$resultId : mixed

getInitialNodes()

Search for nodeids and returns the resultid as well as the page value

public getInitialNodes(string|array<string|int, mixed>|object $search_json[, int $perpage = false ][, int $pagenumber = false ][, mixed $getStarterInfo = false ]) : array<string|int, mixed>

(avoids having to make a call for the resultid and immediately make another to fetch the page value)

Parameters
$search_json : string|array<string|int, mixed>|object

list of parameters that can be encoded in a json string

$perpage : int = false

pagination - the number of results per page

$pagenumber : int = false

pagination - the page number

$getStarterInfo : mixed = false
Return values
array<string|int, mixed>

node_ids

getInitialResults()

Search for nodes and returns the resultid as well as the page value

public getInitialResults(string|array<string|int, mixed>|object $search_json[, int $perpage = false ][, int $pagenumber = false ][, bool $getStarterInfo = false ][, int $searchType = 0 ]) : array<string|int, mixed>

(avoids having to make a call for the resultid and immediately make another to fetch the page value)

Parameters
$search_json : string|array<string|int, mixed>|object

list of parameters that can be encoded in a json string

$perpage : int = false

pagination - the number of results per page

$pagenumber : int = false

pagination - the page number

$getStarterInfo : bool = false
$searchType : int = 0
Return values
array<string|int, mixed>

search_result_structure

getMoreNodes()

Get the node_ids from a search resultId

public getMoreNodes(int $resultId[, int $perpage = false ][, int $pagenumber = false ]) : array<string|int, mixed>
Parameters
$resultId : int

id of the search result

$perpage : int = false

pagination - the number of results per page

$pagenumber : int = false

pagination - the page number

Return values
array<string|int, mixed>

result structure without node content (only nodeids)

getMoreResults()

Get the nodes from a search resultId

public getMoreResults(int $resultId[, int $perpage = false ][, int $pagenumber = false ][, mixed $getStarterInfo = false ]) : array<string|int, mixed>
Parameters
$resultId : int

id of the search result

$perpage : int = false

pagination - the number of results per page

$pagenumber : int = false

pagination - the page number

$getStarterInfo : mixed = false
Return values
array<string|int, mixed>

List of nodes in the resultId

getPageNumber()

Get the page number where the specified node is at on the node list.

public getPageNumber(int $nodeid, array<string|int, mixed> $starter[, int $perpage = 20 ][, int $depth = 0 ][, string $sort = 'asc' ][, bool $include_starter = true ][, string $type = '' ]) : int
Parameters
$nodeid : int

The node id

$starter : array<string|int, mixed>

The starter array

$perpage : int = 20

The number of nodes per page the node list is using

$depth : int = 0

The depth - 0 means no stopping, otherwise 1= direct child, 2= grandchild, etc

$sort : string = 'asc'

The sort order of the node list, 'asc' or 'desc'

$include_starter : bool = true

The flag to indicate if the starter node should be included in the node list or not

$type : string = ''

The content type filter to use. Must be one of the strings defined in self::$showFilterList

Return values
int

The page number of the specified node. 0 means the node was not found.

getSearchableContentTypes()

public getSearchableContentTypes() : mixed

getSearchResult()

Search for nodes

public getSearchResult(string|array<string|int, mixed>|object $search_json[, int $searchType = 0 ]) : int
Parameters
$search_json : string|array<string|int, mixed>|object

list of parameters that can be encoded in a json string

$searchType : int = 0
Return values
int

result_id

instance()

Returns an instance of the API object which translates exceptions to an array Use this method for API clients.

public static instance(string $controller[, bool $refresh_cache = false ]) : vB_Api
Parameters
$controller : string

-- name of the API controller to load

$refresh_cache : bool = false

-- true if we want to force the cache to update with a new api object primarily intended for testing

Return values
vB_Api

instanceInternal()

Returns an instance of the API object which doesn't handle exceptions This should only be used in other API objects, not for clients of the API

public static instanceInternal(string $controller[, bool $refresh_cache = false ]) : vB_Api
Parameters
$controller : string

-- name of the API controller to load

$refresh_cache : bool = false

-- true if we want to force the cache to update with a new api object primarily intended for testing

Return values
vB_Api

is_index_word()

public static is_index_word(mixed $word[, mixed $isLower = false ]) : mixed
Parameters
$word : mixed
$isLower : mixed = false

map_vb4_input_to_vb5()

Returns vb5 api method name.

public static map_vb4_input_to_vb5(string $method, array<string|int, mixed> &$request) : string

May alter request array.

Parameters
$method : string

-- vb4 method name

$request : array<string|int, mixed>

-- $_REQUEST array for this api request

Return values
string

map_vb5_errors_to_vb4()

Alters the error array in any way necessary to interface correctly with vb4.

public static map_vb5_errors_to_vb4(string $method, array<string|int, mixed> &$data) : mixed
Parameters
$method : string

-- vb4 method name

$data : array<string|int, mixed>

-- error array from vb5

map_vb5_output_to_vb4()

Alters the output array in any way necessary to interface correctly with vb4.

public static map_vb5_output_to_vb4(string $method, array<string|int, mixed> &$data) : mixed
Parameters
$method : string

-- vb4 method name

$data : array<string|int, mixed>

-- output array from vb5


        
On this page

Search results