Page MenuHomePhorge
Diviner Tech Docs PhabricatorTypeaheadDatasource

abstract class PhabricatorTypeaheadDatasource
Phorge Technical Documentation (Typeahead)

This class is not documented.

Tasks

Token Functions

Other Methods

Methods

public function __get($name)
Inherited

This method is not documented.
Parameters
$name
Return
wild

public function __set($name, $value)
Inherited

This method is not documented.
Parameters
$name
$value
Return
wild

public function current()
Inherited

This method is not documented.
Return
wild

public function key()
Inherited

This method is not documented.
Return
wild

public function next()
Inherited

This method is not documented.
Return
wild

public function rewind()
Inherited

This method is not documented.
Return
wild

public function valid()
Inherited

This method is not documented.
Return
wild

private function throwOnAttemptedIteration()
Inherited

This method is not documented.
Return
wild

public function getPhobjectClassConstant($key, $byte_limit)
Inherited

Phobject

Read the value of a class constant.

This is the same as just typing self::CONSTANTNAME, but throws a more useful message if the constant is not defined and allows the constant to be limited to a maximum length.

Parameters
string$keyName of the constant.
int|null$byte_limitMaximum number of bytes permitted in the value.
Return
stringValue of the constant.

public function setLimit($limit)

This method is not documented.
Parameters
$limit
Return
wild

public function getLimit()

This method is not documented.
Return
wild

public function setOffset($offset)

This method is not documented.
Parameters
$offset
Return
wild

public function getOffset()

This method is not documented.
Return
wild

public function setViewer($viewer)

This method is not documented.
Parameters
PhabricatorUser$viewer
Return
wild

public function getViewer()

This method is not documented.
Return
wild

public function setRawQuery($raw_query)

This method is not documented.
Parameters
$raw_query
Return
wild

public function getPrefixQuery()

This method is not documented.
Return
wild

public function getRawQuery()

This method is not documented.
Return
wild

public function setQuery($query)

This method is not documented.
Parameters
$query
Return
wild

public function getQuery()

This method is not documented.
Return
wild

public function setParameters($params)

This method is not documented.
Parameters
array$params
Return
wild

public function getParameters()

This method is not documented.
Return
wild

public function getParameter($name, $default)

This method is not documented.
Parameters
$name
$default
Return
wild

public function setIsBrowse($is_browse)

This method is not documented.
Parameters
$is_browse
Return
wild

public function getIsBrowse()

This method is not documented.
Return
wild

public function setPhase($phase)

This method is not documented.
Parameters
$phase
Return
wild

public function getPhase()

This method is not documented.
Return
wild

public function getDatasourceURI()

This method is not documented.
Return
wild

public function getBrowseURI()

This method is not documented.
Return
wild

private function newURIParameters()

This method is not documented.
Return
wild

abstract public function getPlaceholderText()

This method is not documented.
Return
wild

public function getBrowseTitle()

This method is not documented.
Return
wild

abstract public function getDatasourceApplicationClass()

This method is not documented.
Return
wild

abstract public function loadResults()

This method is not documented.
Return
wild

protected function loadResultsForPhase($phase, $limit)

This method is not documented.
Parameters
$phase
$limit
Return
wild

protected function didLoadResults($results)

This method is not documented.
Parameters
array$results
Return
wild

public static function tokenizeString($string)

This method is not documented.
Parameters
$string
Return
wild

public function getTokens()

This method is not documented.
Return
wild

protected function executeQuery($query)

This method is not documented.
Parameters
PhabricatorCursorPagedPolicyAwareQuery$query
Return
wild

public function isBrowsable()

Can the user browse through results from this datasource?

Browsable datasources allow the user to switch from typeahead mode to a browse mode where they can scroll through all results.

By default, datasources are browsable, but some datasources can not generate a meaningful result set or can't filter results on the server.

Return
bool

protected function filterResultsAgainstTokens($results)

Filter a list of results, removing items which don't match the query tokens.

This is useful for datasources which return a static list of hard-coded or configured results and can't easily do query filtering in a real query class. Instead, they can just build the entire result set and use this method to filter it.

For datasources backed by database objects, this is often much less efficient than filtering at the query level.

Parameters
list<PhabricatorTypeaheadResult>$resultsList of typeahead results.
Return
list<PhabricatorTypeaheadResult>Filtered results.

protected function newFunctionResult()

This method is not documented.
Return
wild

public function newInvalidToken($name)

This method is not documented.
Parameters
$name
Return
wild

public function renderTokens($values)

This method is not documented.
Parameters
array$values
Return
wild

protected function renderSpecialTokens($values)

This method is not documented.
Parameters
array$values
Return
wild

public function getDatasourceFunctions()

This method is not documented.
Return
wild

public function getAllDatasourceFunctions()

This method is not documented.
Return
wild

protected function isFunctionWithLoginRequired($function)

Check if this datasource requires a logged-in viewer.

Parameters
string$functionFunction name.
Return
bool

protected function canEvaluateFunction($function)

This method is not documented.
Parameters
$function
Return
wild

protected function shouldStripFunction($function)

This method is not documented.
Parameters
$function
Return
wild

protected function evaluateFunction($function, $argv_list)

This method is not documented.
Parameters
$function
array$argv_list
Return
wild

protected function evaluateValues($values)

This method is not documented.
Parameters
array$values
Return
wild

public function evaluateTokens($tokens)

This method is not documented.
Parameters
array$tokens
Return
wild

protected function didEvaluateTokens($results)

This method is not documented.
Parameters
array$results
Return
wild

public static function isFunctionToken($token)

This method is not documented.
Parameters
$token
Return
wild

protected function parseFunction($token, $allow_partial)

This method is not documented.
Parameters
$token
$allow_partial
Return
wild

public function renderFunctionTokens($function, $argv_list)

This method is not documented.
Parameters
$function
array$argv_list
Return
wild

public function setFunctionStack($function_stack)

This method is not documented.
Parameters
array$function_stack
Return
wild

public function getFunctionStack()

This method is not documented.
Return
wild

protected function getCurrentFunction()

This method is not documented.
Return
wild

protected function renderTokensFromResults($results, $values)

This method is not documented.
Parameters
array$results
array$values
Return
wild

public function getWireTokens($values)

This method is not documented.
Parameters
array$values
Return
wild

final protected function applyFerretConstraints($query, $engine, $ferret_function, $raw_query)

This method is not documented.
Parameters
PhabricatorCursorPagedPolicyAwareQuery$query
PhabricatorFerretEngine$engine
$ferret_function
$raw_query
Return
wild