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
$currentFileName
private
string
$currentFileName
$documentNameResolver read-only
private
DocumentNameResolverInterface
$documentNameResolver
$initialHeaderLevel read-only
private
int
$initialHeaderLevel
$origin read-only
private
FilesystemInterface|FileSystem
$origin
$projectNode read-only
private
ProjectNode
$projectNode
Methods
__construct()
public
__construct(ProjectNode $projectNode, string $currentFileName, string $currentDirectory, int $initialHeaderLevel, FilesystemInterface|FileSystem $origin, DocumentNameResolverInterface $documentNameResolver) : mixed
Parameters
- $projectNode : ProjectNode
- $currentFileName : string
- $currentDirectory : string
- $initialHeaderLevel : int
- $origin : FilesystemInterface|FileSystem
- $documentNameResolver : DocumentNameResolverInterface
absoluteRelativePath()
public
absoluteRelativePath(string $url) : string
Parameters
- $url : string
Return values
stringenterInclude()
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
Return values
stringgetCurrentDirectory()
public
getCurrentDirectory() : string
Return values
stringgetCurrentFileName()
public
getCurrentFileName() : string
Return values
stringgetDirName()
public
getDirName() : string
Return values
stringgetInitialHeaderLevel()
public
getInitialHeaderLevel() : int
Return values
intgetLoggerInformation()
public
getLoggerInformation() : array<string, string>
Return values
array<string, string>getOrigin()
public
getOrigin() : FilesystemInterface|FileSystem
Return values
FilesystemInterface|FileSystemgetProjectNode()
public
getProjectNode() : ProjectNode
Return values
ProjectNodegetUrl()
public
getUrl() : string
Return values
stringisIncludeActive()
public
isIncludeActive(string $path) : bool
Parameters
- $path : string
Return values
boolleaveInclude()
public
leaveInclude() : void
relativeFileName()
public
relativeFileName(string $url) : string
Parameters
- $url : string
Return values
stringsetCurrentFileName()
public
setCurrentFileName(string $currentFileName) : void
Parameters
- $currentFileName : string
ensureWithinOrigin()
private
ensureWithinOrigin(string $relativeFileName) : string
Parameters
- $relativeFileName : string