Documentation

MongoClientMatcher extends AbstractContextAwareMatcher
in package

A MongoDB Client tab completion Matcher.

This matcher provides completion for MongoClient database names.

Tags
author

Marc Garcia markcial@gmail.com

Table of Contents

CONSTANT_SYNTAX  = '^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$'
Syntax types
MISC_OPERATORS  = '+-*/^|&'
T_AND_EQUAL  = 'T_AND_EQUAL'
T_BOOLEAN_AND  = 'T_BOOLEAN_AND'
T_BOOLEAN_OR  = 'T_BOOLEAN_OR'
T_CLONE  = 'T_CLONE'
T_DOUBLE_COLON  = 'T_DOUBLE_COLON'
T_ENCAPSED_AND_WHITESPACE  = 'T_ENCAPSED_AND_WHITESPACE'
T_INCLUDE  = 'T_INCLUDE'
T_INCLUDE_ONCE  = 'T_INCLUDE_ONCE'
T_NEW  = 'T_NEW'
T_NS_SEPARATOR  = 'T_NS_SEPARATOR'
T_OBJECT_OPERATOR  = 'T_OBJECT_OPERATOR'
T_OPEN_TAG  = 'T_OPEN_TAG'
Token values
T_REQUIRE  = 'T_REQUIRE'
T_REQUIRE_ONCE  = 'T_REQUIRE_ONCE'
T_STRING  = 'T_STRING'
T_VARIABLE  = 'T_VARIABLE'
T_WHITESPACE  = 'T_WHITESPACE'
VAR_SYNTAX  = '^\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$'
$context  : Context
Context instance (for ContextAware interface).
getMatches()  : mixed
{@inheritdoc}
hasMatched()  : mixed
{@inheritdoc}
hasSyntax()  : bool
Check whether $token matches a given syntax pattern.
hasToken()  : bool
Check whether $token type is present in $coll.
isOperator()  : bool
Check whether $token is an operator.
needCompleteClass()  : mixed
setContext()  : mixed
ContextAware interface.
startsWith()  : bool
Check whether $word starts with $prefix.
tokenIs()  : bool
Check whether $token type is $which.
getInput()  : string
Get current readline input word.
getNamespaceAndClass()  : string
Get current namespace and class (if any) from readline input.
getVariable()  : mixed
Get a Context variable by name.
getVariables()  : array<string|int, mixed>
Get all variables in the current Context.

Constants

CONSTANT_SYNTAX

Syntax types

public mixed CONSTANT_SYNTAX = '^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$'

T_ENCAPSED_AND_WHITESPACE

public mixed T_ENCAPSED_AND_WHITESPACE = 'T_ENCAPSED_AND_WHITESPACE'

T_OBJECT_OPERATOR

public mixed T_OBJECT_OPERATOR = 'T_OBJECT_OPERATOR'

VAR_SYNTAX

public mixed VAR_SYNTAX = '^\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$'

Properties

Methods

getMatches()

{@inheritdoc}

public getMatches(array<string|int, mixed> $tokens[, array<string|int, mixed> $info = [] ]) : mixed
Parameters
$tokens : array<string|int, mixed>
$info : array<string|int, mixed> = []
Return values
mixed

hasMatched()

{@inheritdoc}

public hasMatched(array<string|int, mixed> $tokens) : mixed
Parameters
$tokens : array<string|int, mixed>
Return values
mixed

hasSyntax()

Check whether $token matches a given syntax pattern.

public static hasSyntax(mixed $token[, string $syntax = self::VAR_SYNTAX ]) : bool
Parameters
$token : mixed

A PHP token (see token_get_all)

$syntax : string = self::VAR_SYNTAX

A syntax pattern (default: variable pattern)

Return values
bool

hasToken()

Check whether $token type is present in $coll.

public static hasToken(array<string|int, mixed> $coll, mixed $token) : bool
Parameters
$coll : array<string|int, mixed>

A list of token types

$token : mixed

A PHP token (see token_get_all)

Return values
bool

isOperator()

Check whether $token is an operator.

public static isOperator(mixed $token) : bool
Parameters
$token : mixed

A PHP token (see token_get_all)

Return values
bool

needCompleteClass()

public static needCompleteClass(mixed $token) : mixed
Parameters
$token : mixed
Return values
mixed

startsWith()

Check whether $word starts with $prefix.

public static startsWith(string $prefix, string $word) : bool
Parameters
$prefix : string
$word : string
Return values
bool

tokenIs()

Check whether $token type is $which.

public static tokenIs(mixed $token, string $which) : bool
Parameters
$token : mixed

A PHP token (see token_get_all)

$which : string

A PHP token type

Return values
bool

getInput()

Get current readline input word.

protected getInput(array<string|int, mixed> $tokens) : string
Parameters
$tokens : array<string|int, mixed>

Tokenized readline input (see token_get_all)

Return values
string

getNamespaceAndClass()

Get current namespace and class (if any) from readline input.

protected getNamespaceAndClass(array<string|int, mixed> $tokens) : string
Parameters
$tokens : array<string|int, mixed>

Tokenized readline input (see token_get_all)

Return values
string

getVariable()

Get a Context variable by name.

protected getVariable(string $var) : mixed
Parameters
$var : string

Variable name

Return values
mixed

getVariables()

Get all variables in the current Context.

protected getVariables() : array<string|int, mixed>
Return values
array<string|int, mixed>

Search results