ContextStack
in package
Table of Contents
- $elements : array<string|int, mixed>
- $project : Project
- $typeContext : Context|null
- __construct() : mixed
- getProject() : Project
- getTypeContext() : Context|null
- peek() : Element|File
- push() : self
- search() : Element|File|null
- Returns the first element of type.
- withTypeContext() : ContextStack
- createFromSelf() : self
Properties
$elements
private
array<string|int, mixed>
$elements
= []
$project
private
Project
$project
$typeContext
private
Context|null
$typeContext
Methods
__construct()
public
__construct(Project $project[, Context|null $typeContext = null ]) : mixed
Parameters
Return values
mixed —getProject()
public
getProject() : Project
Return values
Project —getTypeContext()
public
getTypeContext() : Context|null
Return values
Context|null —peek()
public
peek() : Element|File
Return values
Element|File —push()
public
push(Element|File $element) : self
Parameters
Return values
self —search()
Returns the first element of type.
public
search(class-string $type) : Element|File|null
Will reverse search the stack for an element matching $type. Will return null when the element type is not in the current stack.
Parameters
- $type : class-string
Return values
Element|File|null —withTypeContext()
public
withTypeContext(Context $typeContext) : ContextStack
Parameters
- $typeContext : Context
Return values
ContextStack —createFromSelf()
private
static createFromSelf(Project $project, Context|null $typeContext, array<string|int, \phpDocumentor\Reflection\Element|\phpDocumentor\Reflection\Php\File> $elements) : self
Parameters
- $project : Project
- $typeContext : Context|null
- $elements : array<string|int, \phpDocumentor\Reflection\Element|\phpDocumentor\Reflection\Php\File>