Contentserv PHP API

CSTokenRestContext extends CSTokenModuleContext
in package

This class represents a concrete token context

Tags
access

public

since

CS21.7

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.
createForRestContext()  : CSTokenRestContext
Initializes the token context with valid endpoints.
createFromDefinition()  : CSTokenContext
Restores a token context from the definition stored in the string representation.
setEndpoints()  : void
Sets the valid endpoints for this context.
setModule()  : void
Sets the module name for this context.

Methods

__toString()

Generates the string representation of the token context.

public final __toString() : string
Tags
access

public

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
access

public

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
access

public

Return values
CSTokenModuleContext

The concrete token context instance.

createForRestContext()

Initializes the token context with valid endpoints.

public static createForRestContext(array<string|int, mixed> $aEndpoints) : CSTokenRestContext
Parameters
$aEndpoints : array<string|int, mixed>

The valid endpoints for this context.

Tags
access

public

Return values
CSTokenRestContext

The concrete token context.

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
access

public

Return values
CSTokenContext

A concrete instance of CSToken Context.

setEndpoints()

Sets the valid endpoints for this context.

public setEndpoints(array<string|int, mixed> $aEndpoints) : void
Parameters
$aEndpoints : array<string|int, mixed>

The valid enpoints for this context.

Tags
access

public

Return values
void

setModule()

Sets the module name for this context.

public setModule(string $sModule) : void
Parameters
$sModule : string

The module name for this context.

Tags
access

public

Return values
void

        

Search results