Documentation

FactoryMailerTest extends Factory
in package

Table of Contents

$componentData  : array<string|int, mixed>
The original data passed to the component.
$componentStack  : array<string|int, mixed>
The components being rendered.
$composers  : array<string|int, mixed>
The view composer events.
$container  : Container
The IoC container instance.
$engines  : EngineResolver
The engine implementation.
$events  : Dispatcher
The event dispatcher instance.
$extensions  : array<string|int, mixed>
The extension to engine bindings.
$finder  : ViewFinderInterface
The view finder implementation.
$loopsStack  : array<string|int, mixed>
The stack of in-progress loops.
$parentPlaceholder  : mixed
The parent placeholder for the request.
$prepends  : array<string|int, mixed>
All of the finished, captured prepend sections.
$pushes  : array<string|int, mixed>
All of the finished, captured push sections.
$pushStack  : array<string|int, mixed>
The stack of in-progress push sections.
$renderCount  : int
The number of active rendering operations.
$sections  : array<string|int, mixed>
All of the finished, captured sections.
$sectionStack  : array<string|int, mixed>
The stack of in-progress sections.
$shared  : array<string|int, mixed>
Data that should be available to all templates.
$slots  : array<string|int, mixed>
The slot contents for the component.
$slotStack  : array<string|int, mixed>
The names of the slots being rendered.
$translationReplacements  : array<string|int, mixed>
The translation replacements for the translation being rendered.
__construct()  : void
Create a new view factory instance.
addExtension()  : void
Register a valid view extension and its engine.
addLocation()  : void
Add a location to the array of view locations.
addLoop()  : void
Add new loop to the stack.
addNamespace()  : $this
Add a new namespace to the loader.
appendSection()  : string
Stop injecting content into a section and append it.
callComposer()  : void
Call the composer for a given view.
callCreator()  : void
Call the creator for a given view.
composer()  : array<string|int, mixed>
Register a view composer event.
composers()  : array<string|int, mixed>
Register multiple view composers via an array.
creator()  : array<string|int, mixed>
Register a view creator event.
decrementRender()  : void
Decrement the rendering counter.
doneRendering()  : bool
Check if there are no active render operations.
endSlot()  : void
Save the slot content for rendering.
exists()  : bool
Determine if a given view exists.
file()  : View
Get the evaluated view contents for the given view.
first()  : View
Get the first view that actually exists from the given list.
flushFinderCache()  : void
Flush the cache of views located by the finder.
flushSections()  : void
Flush all of the sections.
flushStacks()  : void
Flush all of the stacks.
flushState()  : void
Flush all of the factory state like sections and stacks.
flushStateIfDoneRendering()  : void
Flush all of the section contents if done rendering.
getContainer()  : Container
Get the IoC container instance.
getDispatcher()  : Dispatcher
Get the event dispatcher instance.
getEngineFromPath()  : Engine
Get the appropriate view engine for the given path.
getEngineResolver()  : EngineResolver
Get the engine resolver instance.
getExtensions()  : array<string|int, mixed>
Get the extension to engine bindings.
getFinder()  : ViewFinderInterface
Get the view finder instance.
getLastLoop()  : stdClass|null
Get an instance of the last loop in the stack.
getLoopStack()  : array<string|int, mixed>
Get the entire loop stack.
getSection()  : mixed
Get the contents of a section.
getSections()  : array<string|int, mixed>
Get the entire array of sections.
getShared()  : array<string|int, mixed>
Get all of the shared data for the environment.
hasSection()  : bool
Check if section exists.
incrementLoopIndices()  : void
Increment the top loop's indices.
incrementRender()  : void
Increment the rendering counter.
inject()  : void
Inject inline content into a section.
make()  : View
Get the evaluated view contents for the given view.
parentPlaceholder()  : string
Get the parent placeholder for the current request.
popLoop()  : void
Pop a loop from the top of the loop stack.
prependNamespace()  : $this
Prepend a new namespace to the loader.
renderComponent()  : string
Render the current component.
renderEach()  : string
Get the rendered contents of a partial from a loop.
renderTranslation()  : string
Render the current translation.
renderWhen()  : string
Get the rendered content of the view based on a given condition.
replaceNamespace()  : $this
Replace the namespace hints for the given namespace.
setContainer()  : void
Set the IoC container instance.
setDispatcher()  : void
Set the event dispatcher instance.
setFinder()  : void
Set the view finder instance.
share()  : mixed
Add a piece of shared data to the environment.
shared()  : mixed
Get an item from the shared data.
slot()  : void
Start the slot rendering process.
startComponent()  : void
Start a component rendering process.
startPrepend()  : void
Start prepending content into a push section.
startPush()  : void
Start injecting content into a push section.
startSection()  : void
Start injecting content into a section.
startTranslation()  : void
Start a translation block.
stopPrepend()  : string
Stop prepending content into a push section.
stopPush()  : string
Stop injecting content into a push section.
stopSection()  : string
Stop injecting content into a section.
yieldContent()  : string
Get the string contents of a section.
yieldPushContent()  : string
Get the string contents of a push section.
yieldSection()  : string
Stop injecting content into a section and return its contents.
addClassEvent()  : Closure
Register a class based view composer.
addEventListener()  : void
Add a listener to the event dispatcher.
addViewEvent()  : Closure|null
Add an event for a given view.
buildClassEventCallback()  : Closure
Build a class based container callback Closure.
classEventMethodForPrefix()  : string
Determine the class event method based on the given prefix.
componentData()  : array<string|int, mixed>
Get the data for the given component.
currentComponent()  : int
Get the index for the current component.
extendPrepend()  : void
Prepend content to a given stack.
extendPush()  : void
Append content to a given push section.
extendSection()  : void
Append content to a given section.
getExtension()  : string
Get the extension used by the view file.
normalizeName()  : string
Normalize a view name.
parseClassEvent()  : array<string|int, mixed>
Parse a class based composer name.
parseData()  : array<string|int, mixed>
Parse the given data into a raw array.
viewInstance()  : View
Create a new view instance from the given arguments.

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 = []

$composers

The view composer events.

protected array<string|int, mixed> $composers = []

$extensions

The extension to engine bindings.

protected array<string|int, mixed> $extensions = ['blade.php' => 'blade', 'php' => 'php', 'css' => 'file']

$loopsStack

The stack of in-progress loops.

protected array<string|int, mixed> $loopsStack = []

$parentPlaceholder

The parent placeholder for the request.

protected static mixed $parentPlaceholder = []

$prepends

All of the finished, captured prepend sections.

protected array<string|int, mixed> $prepends = []

$pushes

All of the finished, captured push sections.

protected array<string|int, mixed> $pushes = []

$pushStack

The stack of in-progress push sections.

protected array<string|int, mixed> $pushStack = []

$renderCount

The number of active rendering operations.

protected int $renderCount = 0

$sections

All of the finished, captured sections.

protected array<string|int, mixed> $sections = []

$sectionStack

The stack of in-progress sections.

protected array<string|int, mixed> $sectionStack = []

$shared

Data that should be available to all templates.

protected array<string|int, mixed> $shared = []

$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 = []

$translationReplacements

The translation replacements for the translation being rendered.

protected array<string|int, mixed> $translationReplacements = []

Methods

__construct()

Create a new view factory instance.

public __construct() : void
Return values
void

addExtension()

Register a valid view extension and its engine.

public addExtension(string $extension, string $engine[, Closure $resolver = null ]) : void
Parameters
$extension : string
$engine : string
$resolver : Closure = null
Return values
void

addLocation()

Add a location to the array of view locations.

public addLocation(string $location) : void
Parameters
$location : string
Return values
void

addLoop()

Add new loop to the stack.

public addLoop(Countable|array<string|int, mixed> $data) : void
Parameters
$data : Countable|array<string|int, mixed>
Return values
void

addNamespace()

Add a new namespace to the loader.

public addNamespace(string $namespace, string|array<string|int, mixed> $hints) : $this
Parameters
$namespace : string
$hints : string|array<string|int, mixed>
Return values
$this

appendSection()

Stop injecting content into a section and append it.

public appendSection() : string
Tags
throws
InvalidArgumentException
Return values
string

callComposer()

Call the composer for a given view.

public callComposer(View $view) : void
Parameters
$view : View
Return values
void

callCreator()

Call the creator for a given view.

public callCreator(View $view) : void
Parameters
$view : View
Return values
void

composer()

Register a view composer event.

public composer(array<string|int, mixed>|string $views, Closure|string $callback) : array<string|int, mixed>
Parameters
$views : array<string|int, mixed>|string
$callback : Closure|string
Return values
array<string|int, mixed>

composers()

Register multiple view composers via an array.

public composers(array<string|int, mixed> $composers) : array<string|int, mixed>
Parameters
$composers : array<string|int, mixed>
Return values
array<string|int, mixed>

creator()

Register a view creator event.

public creator(array<string|int, mixed>|string $views, Closure|string $callback) : array<string|int, mixed>
Parameters
$views : array<string|int, mixed>|string
$callback : Closure|string
Return values
array<string|int, mixed>

decrementRender()

Decrement the rendering counter.

public decrementRender() : void
Return values
void

doneRendering()

Check if there are no active render operations.

public doneRendering() : bool
Return values
bool

endSlot()

Save the slot content for rendering.

public endSlot() : void
Return values
void

exists()

Determine if a given view exists.

public exists(string $view) : bool
Parameters
$view : string
Return values
bool

file()

Get the evaluated view contents for the given view.

public file(string $path[, array<string|int, mixed> $data = [] ][, array<string|int, mixed> $mergeData = [] ]) : View
Parameters
$path : string
$data : array<string|int, mixed> = []
$mergeData : array<string|int, mixed> = []
Return values
View

first()

Get the first view that actually exists from the given list.

public first(array<string|int, mixed> $views[, array<string|int, mixed> $data = [] ][, array<string|int, mixed> $mergeData = [] ]) : View
Parameters
$views : array<string|int, mixed>
$data : array<string|int, mixed> = []
$mergeData : array<string|int, mixed> = []
Return values
View

flushFinderCache()

Flush the cache of views located by the finder.

public flushFinderCache() : void
Return values
void

flushSections()

Flush all of the sections.

public flushSections() : void
Return values
void

flushStacks()

Flush all of the stacks.

public flushStacks() : void
Return values
void

flushState()

Flush all of the factory state like sections and stacks.

public flushState() : void
Return values
void

flushStateIfDoneRendering()

Flush all of the section contents if done rendering.

public flushStateIfDoneRendering() : void
Return values
void

getEngineFromPath()

Get the appropriate view engine for the given path.

public getEngineFromPath(string $path) : Engine
Parameters
$path : string
Tags
throws
InvalidArgumentException
Return values
Engine

getExtensions()

Get the extension to engine bindings.

public getExtensions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getLastLoop()

Get an instance of the last loop in the stack.

public getLastLoop() : stdClass|null
Return values
stdClass|null

getLoopStack()

Get the entire loop stack.

public getLoopStack() : array<string|int, mixed>
Return values
array<string|int, mixed>

getSection()

Get the contents of a section.

public getSection(string $name[, string $default = null ]) : mixed
Parameters
$name : string
$default : string = null
Return values
mixed

getSections()

Get the entire array of sections.

public getSections() : array<string|int, mixed>
Return values
array<string|int, mixed>

getShared()

Get all of the shared data for the environment.

public getShared() : array<string|int, mixed>
Return values
array<string|int, mixed>

hasSection()

Check if section exists.

public hasSection(string $name) : bool
Parameters
$name : string
Return values
bool

incrementLoopIndices()

Increment the top loop's indices.

public incrementLoopIndices() : void
Return values
void

incrementRender()

Increment the rendering counter.

public incrementRender() : void
Return values
void

inject()

Inject inline content into a section.

public inject(string $section, string $content) : void
Parameters
$section : string
$content : string
Return values
void

make()

Get the evaluated view contents for the given view.

public make(string $view[, array<string|int, mixed> $data = [] ][, array<string|int, mixed> $mergeData = [] ]) : View
Parameters
$view : string
$data : array<string|int, mixed> = []
$mergeData : array<string|int, mixed> = []
Return values
View

parentPlaceholder()

Get the parent placeholder for the current request.

public static parentPlaceholder([string $section = '' ]) : string
Parameters
$section : string = ''
Return values
string

popLoop()

Pop a loop from the top of the loop stack.

public popLoop() : void
Return values
void

prependNamespace()

Prepend a new namespace to the loader.

public prependNamespace(string $namespace, string|array<string|int, mixed> $hints) : $this
Parameters
$namespace : string
$hints : string|array<string|int, mixed>
Return values
$this

renderComponent()

Render the current component.

public renderComponent() : string
Return values
string

renderEach()

Get the rendered contents of a partial from a loop.

public renderEach(string $view, array<string|int, mixed> $data, string $iterator[, string $empty = 'raw|' ]) : string
Parameters
$view : string
$data : array<string|int, mixed>
$iterator : string
$empty : string = 'raw|'
Return values
string

renderTranslation()

Render the current translation.

public renderTranslation() : string
Return values
string

renderWhen()

Get the rendered content of the view based on a given condition.

public renderWhen(bool $condition, string $view[, array<string|int, mixed> $data = [] ][, array<string|int, mixed> $mergeData = [] ]) : string
Parameters
$condition : bool
$view : string
$data : array<string|int, mixed> = []
$mergeData : array<string|int, mixed> = []
Return values
string

replaceNamespace()

Replace the namespace hints for the given namespace.

public replaceNamespace(string $namespace, string|array<string|int, mixed> $hints) : $this
Parameters
$namespace : string
$hints : string|array<string|int, mixed>
Return values
$this

setContainer()

Set the IoC container instance.

public setContainer(Container $container) : void
Parameters
$container : Container
Return values
void

setDispatcher()

Set the event dispatcher instance.

public setDispatcher(Dispatcher $events) : void
Parameters
$events : Dispatcher
Return values
void

share()

Add a piece of shared data to the environment.

public share(array<string|int, mixed>|string $key[, mixed $value = null ]) : mixed
Parameters
$key : array<string|int, mixed>|string
$value : mixed = null
Return values
mixed

shared()

Get an item from the shared data.

public shared(string $key[, mixed $default = null ]) : mixed
Parameters
$key : string
$default : mixed = null
Return values
mixed

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

startPrepend()

Start prepending content into a push section.

public startPrepend(string $section[, string $content = '' ]) : void
Parameters
$section : string
$content : string = ''
Return values
void

startPush()

Start injecting content into a push section.

public startPush(string $section[, string $content = '' ]) : void
Parameters
$section : string
$content : string = ''
Return values
void

startSection()

Start injecting content into a section.

public startSection(string $section[, string|null $content = null ]) : void
Parameters
$section : string
$content : string|null = null
Return values
void

startTranslation()

Start a translation block.

public startTranslation([array<string|int, mixed> $replacements = [] ]) : void
Parameters
$replacements : array<string|int, mixed> = []
Return values
void

stopPrepend()

Stop prepending content into a push section.

public stopPrepend() : string
Tags
throws
InvalidArgumentException
Return values
string

stopPush()

Stop injecting content into a push section.

public stopPush() : string
Tags
throws
InvalidArgumentException
Return values
string

stopSection()

Stop injecting content into a section.

public stopSection([bool $overwrite = false ]) : string
Parameters
$overwrite : bool = false
Tags
throws
InvalidArgumentException
Return values
string

yieldContent()

Get the string contents of a section.

public yieldContent(string $section[, string $default = '' ]) : string
Parameters
$section : string
$default : string = ''
Return values
string

yieldPushContent()

Get the string contents of a push section.

public yieldPushContent(string $section[, string $default = '' ]) : string
Parameters
$section : string
$default : string = ''
Return values
string

yieldSection()

Stop injecting content into a section and return its contents.

public yieldSection() : string
Return values
string

addClassEvent()

Register a class based view composer.

protected addClassEvent(string $view, string $class, string $prefix) : Closure
Parameters
$view : string
$class : string
$prefix : string
Return values
Closure

addEventListener()

Add a listener to the event dispatcher.

protected addEventListener(string $name, Closure $callback) : void
Parameters
$name : string
$callback : Closure
Return values
void

addViewEvent()

Add an event for a given view.

protected addViewEvent(string $view, Closure|string $callback[, string $prefix = 'composing: ' ]) : Closure|null
Parameters
$view : string
$callback : Closure|string
$prefix : string = 'composing: '
Return values
Closure|null

buildClassEventCallback()

Build a class based container callback Closure.

protected buildClassEventCallback(string $class, string $prefix) : Closure
Parameters
$class : string
$prefix : string
Return values
Closure

classEventMethodForPrefix()

Determine the class event method based on the given prefix.

protected classEventMethodForPrefix(string $prefix) : string
Parameters
$prefix : string
Return values
string

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
Return values
int

extendPrepend()

Prepend content to a given stack.

protected extendPrepend(string $section, string $content) : void
Parameters
$section : string
$content : string
Return values
void

extendPush()

Append content to a given push section.

protected extendPush(string $section, string $content) : void
Parameters
$section : string
$content : string
Return values
void

extendSection()

Append content to a given section.

protected extendSection(string $section, string $content) : void
Parameters
$section : string
$content : string
Return values
void

getExtension()

Get the extension used by the view file.

protected getExtension(string $path) : string
Parameters
$path : string
Return values
string

normalizeName()

Normalize a view name.

protected normalizeName(string $name) : string
Parameters
$name : string
Return values
string

parseClassEvent()

Parse a class based composer name.

protected parseClassEvent(string $class, string $prefix) : array<string|int, mixed>
Parameters
$class : string
$prefix : string
Return values
array<string|int, mixed>

parseData()

Parse the given data into a raw array.

protected parseData(mixed $data) : array<string|int, mixed>
Parameters
$data : mixed
Return values
array<string|int, mixed>

viewInstance()

Create a new view instance from the given arguments.

protected viewInstance(string $view, string $path, array<string|int, mixed> $data) : View
Parameters
$view : string
$path : string
$data : array<string|int, mixed>
Return values
View

Search results