ViewMaker
trait ViewMaker
Properties
array | $vars | ||
array | $viewPath | ||
array | $layoutPath | ||
array | $partialPath | ||
string | $layout | ||
bool | $suppressLayout | ||
protected | $viewFileExtension |
Methods
No description
No description
Guess the package path from a specified class.
Render a layout.
Loads a view with the name specified.
Render a partial file contents located in the views or partial folder.
Includes a file path using output buffering.
No description
Get the data bound to the view instance.
Details
at line 50
getViewPath($view, $viewPath = null)
No description
at line 78
guessViewFileExtension($path)
No description
at line 98
string
guessViewPath(string $suffix = '', bool $isPublic = false)
Guess the package path from a specified class.
at line 119
mixed
makeLayout(string $name = null, array $vars = [], bool $throwException = true)
Render a layout.
at line 147
string
makeView(string $view)
Loads a view with the name specified.
Applies layout if its name is provided by the parent object. The view file must be situated in the views directory, and has the extension "htm" or "php".
at line 171
mixed
makePartial(string $partial, array $vars = [], bool $throwException = true)
Render a partial file contents located in the views or partial folder.
at line 199
string
makeFileContent(string $filePath, array $extraParams = [])
Includes a file path using output buffering.
Ensures that vars are available.
at line 237
compileFileContent($filePath)
No description
at line 258
protected void
handleViewException(Exception $e, int $obLevel)
Handle a view exception.
at line 273
protected array
gatherViewData($data)
Get the data bound to the view instance.