Guides

ParserContext
in package

Table of Contents

Properties

$activeIncludeChain  : string[]
$currentDirectory  : string
$currentFileName  : string
$documentNameResolver  : DocumentNameResolverInterface
$initialHeaderLevel  : int
$origin  : FilesystemInterface|FileSystem
$projectNode  : ProjectNode

Methods

__construct()  : mixed
absoluteRelativePath()  : string
enterInclude()  : void
getActiveIncludeChain()  : string[]
getCurrentAbsolutePath()  : string
Return the current file's absolute path on the Origin file system.
getCurrentDirectory()  : string
getCurrentFileName()  : string
getDirName()  : string
getInitialHeaderLevel()  : int
getLoggerInformation()  : array<string, string>
getOrigin()  : FilesystemInterface|FileSystem
getProjectNode()  : ProjectNode
getUrl()  : string
isIncludeActive()  : bool
leaveInclude()  : void
relativeFileName()  : string
setCurrentFileName()  : void
ensureWithinOrigin()  : string

Properties

$activeIncludeChain

private string[] $activeIncludeChain = []

$currentDirectory read-only

private string $currentDirectory

$initialHeaderLevel read-only

private int $initialHeaderLevel

Methods

absoluteRelativePath()

public absoluteRelativePath(string $url) : string
Parameters
$url : string
Return values
string

enterInclude()

public enterInclude(string $path) : void
Parameters
$path : string

getActiveIncludeChain()

public getActiveIncludeChain() : string[]
Return values
string[]

getCurrentAbsolutePath()

Return the current file's absolute path on the Origin file system.

public getCurrentAbsolutePath() : string

In order to load files relative to the current file (such as embedding UML diagrams) the environment must expose what the absolute path relative to the Origin is.

Tags
see
self::setCurrentAbsolutePath()

for more information

self::getOrigin()

for the filesystem on which to use this path

Return values
string

getCurrentDirectory()

public getCurrentDirectory() : string
Return values
string

getCurrentFileName()

public getCurrentFileName() : string
Return values
string

getDirName()

public getDirName() : string
Return values
string

getInitialHeaderLevel()

public getInitialHeaderLevel() : int
Return values
int

getLoggerInformation()

public getLoggerInformation() : array<string, string>
Return values
array<string, string>

isIncludeActive()

public isIncludeActive(string $path) : bool
Parameters
$path : string
Return values
bool

relativeFileName()

public relativeFileName(string $url) : string
Parameters
$url : string
Return values
string

setCurrentFileName()

public setCurrentFileName(string $currentFileName) : void
Parameters
$currentFileName : string

ensureWithinOrigin()

private ensureWithinOrigin(string $relativeFileName) : string
Parameters
$relativeFileName : string
Return values
string
On this page

Search results