PartialStack
in package
Manager class for stacking nested partials and keeping track of their components. Partial "objects" store the components used by that partial for deferred retrieval.
Tags
Table of Contents
- $activePartial : array<string|int, mixed>
- $partialStack : array<string|int, mixed>
- addComponent() : mixed
- Adds a component to the active partial stack.
- getComponent() : mixed
- Returns a component by its alias from the partial stack.
- stackPartial() : mixed
- Partial entry point, appends a new partial to the stack.
- unstackPartial() : mixed
- Partial exit point, removes the active partial from the stack.
- findComponentFromStack() : mixed
- Locates a component by its alias from the supplied stack.
Properties
$activePartial
public
array<string|int, mixed>
$activePartial
The current partial "object" being rendered.
$partialStack
protected
array<string|int, mixed>
$partialStack
= []
Collection of previously rendered partial "objects".
Methods
addComponent()
Adds a component to the active partial stack.
public
addComponent(mixed $alias, mixed $componentObj) : mixed
Parameters
- $alias : mixed
- $componentObj : mixed
Return values
mixed —getComponent()
Returns a component by its alias from the partial stack.
public
getComponent(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —stackPartial()
Partial entry point, appends a new partial to the stack.
public
stackPartial() : mixed
Return values
mixed —unstackPartial()
Partial exit point, removes the active partial from the stack.
public
unstackPartial() : mixed
Return values
mixed —findComponentFromStack()
Locates a component by its alias from the supplied stack.
protected
findComponentFromStack(mixed $name, mixed $stack) : mixed
Parameters
- $name : mixed
- $stack : mixed