Contentserv PHP API

CSTokenFileContext extends CSTokenContext
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.
createForFileContext()  : CSTokenFileContext
Initializes the context with the matching file name.
createFromDefinition()  : CSTokenContext
Restores a token context from the definition stored in the string representation.
setFile()  : void
Sets the file 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.

createForFileContext()

Initializes the context with the matching file name.

public static createForFileContext(string $sFile) : CSTokenFileContext
Parameters
$sFile : string

The file name valid for this context.

Tags
access

public

Return values
CSTokenFileContext

The 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
access

public

Return values
CSTokenContext

A concrete instance of CSToken Context.

setFile()

Sets the file for this context.

public setFile(string $sFile) : void
Parameters
$sFile : string

The file name matching the context.

Tags
access

public

Return values
void

        

Search results