ManagesComponents
Table of Contents
- $componentData : array<string|int, mixed>
- The original data passed to the component.
- $componentStack : array<string|int, mixed>
- The components being rendered.
- $slots : array<string|int, mixed>
- The slot contents for the component.
- $slotStack : array<string|int, mixed>
- The names of the slots being rendered.
- endSlot() : void
- Save the slot content for rendering.
- renderComponent() : string
- Render the current component.
- slot() : void
- Start the slot rendering process.
- startComponent() : void
- Start a component rendering process.
- componentData() : array<string|int, mixed>
- Get the data for the given component.
- currentComponent() : int
- Get the index for the current component.
Properties
$componentData
The original data passed to the component.
protected
array<string|int, mixed>
$componentData
= []
$componentStack
The components being rendered.
protected
array<string|int, mixed>
$componentStack
= []
$slots
The slot contents for the component.
protected
array<string|int, mixed>
$slots
= []
$slotStack
The names of the slots being rendered.
protected
array<string|int, mixed>
$slotStack
= []
Methods
endSlot()
Save the slot content for rendering.
public
endSlot() : void
Return values
void —renderComponent()
Render the current component.
public
renderComponent() : string
Return values
string —slot()
Start the slot rendering process.
public
slot(string $name[, string|null $content = null ]) : void
Parameters
- $name : string
- $content : string|null = null
Return values
void —startComponent()
Start a component rendering process.
public
startComponent(string $name[, array<string|int, mixed> $data = [] ]) : void
Parameters
- $name : string
- $data : array<string|int, mixed> = []
Return values
void —componentData()
Get the data for the given component.
protected
componentData(string $name) : array<string|int, mixed>
Parameters
- $name : string
Return values
array<string|int, mixed> —currentComponent()
Get the index for the current component.
protected
currentComponent() : int