View
Implements
Uses
Properties
$view string
The name of the view.
$data array
The array of view data.
$path string
The path to the view file.
Methods
__construct ( Factory $factory , Engine $engine , $view , $path , $data ) : void
Create a new view instance.
Parameters
render ( callable $callback ) : string
Get the string contents of the view.
Parameters
- $callback callable|null
renderContents ( ) : string
Get the contents of the view instance.
getContents ( ) : string
Get the evaluated contents of the view.
gatherData ( ) : array
Get the data bound to the view instance.
renderSections ( ) : array
Get the sections of the rendered view.
with ( $key , $value ) : $this
Add a piece of data to the view.
Parameters
- $key string|array
- $value mixed
nest ( $key , $view , array $data ) : $this
Add a view instance to the view data.
Parameters
- $key string
- $view string
- $data array
withErrors ( $provider , $bag ) : $this
Add validation errors to the view.
Parameters
- $provider MessageProvider |array
- $bag string
formatErrors ( $provider ) : MessageBag
Parse the given errors into an appropriate value.
Parameters
- $provider MessageProvider |array|string
name ( ) : string
Get the name of the view.
getName ( ) : string
Get the name of the view.
getData ( ) : array
Get the array of view data.
getPath ( ) : string
Get the path to the view file.
setPath ( $path ) : void
Set the path to the view.
Parameters
- $path string
offsetExists ( $key ) : bool
Determine if a piece of data is bound.
Parameters
- $key string
offsetGet ( $key ) : mixed
Get a piece of bound data to the view.
Parameters
- $key string
offsetSet ( $key , $value ) : void
Set a piece of data on the view.
Parameters
- $key string
- $value mixed
offsetUnset ( $key ) : void
Unset a piece of data from the view.
Parameters
- $key string
__get ( $key ) : mixed
Get a piece of data from the view.
Parameters
- $key string
__set ( $key , $value ) : void
Set a piece of data on the view.
Parameters
- $key string
- $value mixed
__isset ( $key ) : bool
Check if a piece of data is bound to the view.
Parameters
- $key string
__unset ( $key ) : void
Remove a piece of bound data from the view.
Parameters
- $key string
__call ( $method , $parameters ) : View
Dynamically bind parameters to the view.
Parameters
- $method string
- $parameters array
toHtml ( ) : string
Get content as a string of HTML.
__toString ( ) : string
Get the string contents of the view.