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 100
string
guessViewPath(string $suffix = '', bool $isPublic = FALSE)
Guess the package path from a specified class.
at line 121
mixed
makeLayout(string $name = null, array $vars = [], bool $throwException = TRUE)
Render a layout.
at line 149
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 173
mixed
makePartial(string $partial, array $vars = [], bool $throwException = TRUE)
Render a partial file contents located in the views or partial folder.
at line 201
string
makeFileContent(string $filePath, array $extraParams = [])
Includes a file path using output buffering.
Ensures that vars are available.
at line 239
compileFileContent($filePath)
No description
at line 260
protected void
handleViewException(Exception $e, int $obLevel)
Handle a view exception.
at line 275
protected array
gatherViewData($data)
Get the data bound to the view instance.