CSTokenModuleContext
extends CSTokenContext
in package
This class represents a concrete token context
Tags
Table of Contents
- __toString() : string
- Generates the string representation of the token context.
- check() : bool
- Checks if the token context instance is valid for the current context.
- createForModuleContext() : CSTokenModuleContext
- Initializes the context with the matching module name.
- createFromDefinition() : CSTokenContext
- Restores a token context from the definition stored in the string representation.
- setModule() : void
- Sets the module name for this context.
Methods
__toString()
Generates the string representation of the token context.
public
final __toString() : string
Tags
Return values
string —String representation of the token context.
check()
Checks if the token context instance is valid for the current context.
public
final check() : bool
Tags
Return values
bool —True, if token context matches the context, otherwise false.
createForModuleContext()
Initializes the context with the matching module name.
public
final static createForModuleContext(string $sModule) : CSTokenModuleContext
Parameters
- $sModule : string
-
The module name valid for this context.
Tags
Return values
CSTokenModuleContext —The concrete token context instance.
createFromDefinition()
Restores a token context from the definition stored in the string representation.
public
final static createFromDefinition(array<string|int, mixed> $aDefinition) : CSTokenContext
Parameters
- $aDefinition : array<string|int, mixed>
-
The token context definition retrieved from string representation.
Tags
Return values
CSTokenContext —A concrete instance of CSToken Context.
setModule()
Sets the module name for this context.
public
setModule(string $sModule) : void
Parameters
- $sModule : string
-
The module name for this context.
