PHP Class Bluz\View\View

Author: Anton Shevchuk, ErgallM
Inheritance: implements Bluz\View\ViewInterface, implements JsonSerializable, use trait Bluz\Common\Container\Container, use trait Bluz\Common\Container\JsonSerialize, use trait Bluz\Common\Container\MagicAccess, use trait Bluz\Common\Options, use trait Bluz\Common\Helper
Show file Open project: bluzphp/framework Class Usage Examples

Protected Properties

Property Type Description
$baseUrl base url
$partialPath paths to partial
$path path to template
$template template name

Public Methods

Method Description
__construct ( ) Create view instance, initial default helper path
__sleep ( ) : string[] List of packed properties
__toString ( ) : string Render like string
addPartialPath ( string $path ) : View Add partial path for use inside partial and partialLoop helpers
setPath ( string $path ) : void
setTemplate ( string $file ) : void

Method Details

__construct() public method

Create view instance, initial default helper path
public __construct ( )

__sleep() public method

List of packed properties
public __sleep ( ) : string[]
return string[]

__toString() public method

Render like string
public __toString ( ) : string
return string

addPartialPath() public method

Add partial path for use inside partial and partialLoop helpers
public addPartialPath ( string $path ) : View
$path string
return View

setPath() public method

public setPath ( string $path ) : void
$path string
return void

setTemplate() public method

public setTemplate ( string $file ) : void
$file string
return void

Property Details

$baseUrl protected property

base url
protected $baseUrl

$partialPath protected property

paths to partial
protected $partialPath

$path protected property

path to template
protected $path

$template protected property

template name
protected $template