View class
Framework\MVC\View
Class View.
Defined in libraries/mvc/src/View.php
Properties #
- $baseDir
- -
- $extension
- -
- $layout
- -
- $openBlock
- -
- $openBlocks
- -
- $layoutsOpen
- -
- $blocks
- -
- $currentView
- -
- $debugCollector
- -
- $layoutPrefix
- -
- $includePrefix
- -
- $inInclude
- -
- $showDebugComments
- -
- $viewsPaths
- -
- $instanceName
- -
- $throwExceptionsInDestructor
- -
$baseDir
$extension
$layout
$openBlock
$openBlocks
$layoutsOpen
$blocks
$currentView
$debugCollector
$layoutPrefix
$includePrefix
$inInclude
$showDebugComments
$viewsPaths
$instanceName
$throwExceptionsInDestructor
Methods #
- __construct()
- -
- __destruct()
- -
- block()
- Open a block.
- currentBlock()
- Tells the name of the current block.
- disableDebugComments()
- Disable debug comments when in debug mode.
- enableDebugComments()
- Enable debug comments when in debug mode.
- endBlock()
- Close an open block.
- extends()
- Extends a layout.
- extendsWithoutPrefix()
- Extends a layout without prefix.
- getBaseDir()
- Get the base directory.
- getExtension()
- Get the extension of view files.
- getIncludePrefix()
- Get the name of the includes directory.
- getInstanceName()
- -
- getInstanceNameWithPath()
- -
- getLayoutPrefix()
- Get the name of the layouts directory.
- hasBlock()
- Tells whether a given block is set.
- inBlock()
- Tells whether the current content is inside a block.
- inLayout()
- Tells whether the current contents is inside a layout.
- include()
- Returns the contents of an include.
- includeWithoutPrefix()
- Returns the contents of an include without prefix.
- isShowingDebugComments()
- Tells if it is showing debug comments when in debug mode.
- isThrowExceptionsInDestructor()
- Tells whether it is able to throw exceptions in the destructor.
- removeBlock()
- Remove a block.
- render()
- Render a view file.
- renderBlock()
- Render a block.
- setBaseDir()
- Sets the base directory where the views files are located.
- setDebugCollector()
- -
- setExtension()
- Set the extension of views files.
- setIncludePrefix()
- Set the name of a directory for includes within the base directory.
- setInstanceName()
- -
- setLayoutPrefix()
- Set the name of a directory for layouts within the base directory.
- setThrowExceptionsInDestructor()
- Enables/disables exceptions in the destructor.
- getCommentPath()
- -
- getContents()
- -
- getFilepath()
- -
- getIncludeContents()
- -
- getIncludeContentsWithDebug()
- -
- getNamespacedFilepath()
- -
- involveInclude()
- -
- makeDirectoryPrefix()
- -
- setDebugData()
- -
__construct()
- ?string $baseDir
- string $extension
__destruct()
block()
Open a block.
- string $name - Block name
currentBlock()
Tells the name of the current block.
disableDebugComments()
Disable debug comments when in debug mode.
enableDebugComments()
Enable debug comments when in debug mode.
endBlock()
Close an open block.
extends()
Extends a layout.
- string $layout - The name of the file within the layouts directory
- ?string $openBlock - Optionally opens and closes this block automatically
extendsWithoutPrefix()
Extends a layout without prefix.
- string $layout - The name of the file within the base directory
getBaseDir()
Get the base directory.
getExtension()
Get the extension of view files.
getIncludePrefix()
Get the name of the includes directory.
getInstanceName()
getInstanceNameWithPath()
- string $name
getLayoutPrefix()
Get the name of the layouts directory.
hasBlock()
Tells whether a given block is set.
- string $name - Block name
inBlock()
Tells whether the current content is inside a block.
- string $name - Block name
inLayout()
Tells whether the current contents is inside a layout.
- string $layout
include()
Returns the contents of an include.
- string $view - The path of the file within the includes directory
- array $data - Data passed to the view. The array keys will be variables
includeWithoutPrefix()
Returns the contents of an include without prefix.
- string $view - The path of the file within the base directory
- array $data - Data passed to the view. The array keys will be variables
isShowingDebugComments()
Tells if it is showing debug comments when in debug mode.
isThrowExceptionsInDestructor()
Tells whether it is able to throw exceptions in the destructor.
removeBlock()
Remove a block.
- string $name - Block name
render()
Render a view file.
- string $view - View path within the base directory
- array $data - Data passed to the view. The array keys will be variables
renderBlock()
Render a block.
- string $name - Block name
setBaseDir()
Sets the base directory where the views files are located.
- string $baseDir
setDebugCollector()
- \Framework\MVC\Debug\ViewsCollector $debugCollector
setExtension()
Set the extension of views files.
- string $extension
setIncludePrefix()
Set the name of a directory for includes within the base directory.
- string $prefix
setInstanceName()
- string $instanceName
setLayoutPrefix()
Set the name of a directory for layouts within the base directory.
- string $prefix
setThrowExceptionsInDestructor()
Enables/disables exceptions in the destructor.
- bool $active - True to throw exceptions, false otherwise
getCommentPath()
- string $name
getContents()
- string $view
- array $data
getFilepath()
- string $view
getIncludeContents()
- string $view
- array $data
getIncludeContentsWithDebug()
- string $view
- array $data
getNamespacedFilepath()
- string $view
involveInclude()
- string $view
- string $contents
makeDirectoryPrefix()
- string $prefix
setDebugData()
- string $file
- float $start
- string $type