PHP Класс Ip\View

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$overrides

Открытые методы

Метод Описание
__construct ( string $file, array $data = [] ) Construct view object using specified file and data.
__toString ( ) : string PHP can't handle exceptions in __toString method. Try to avoid it every time possible. Use render() method instead.
clearOverride ( $source ) Clear registered view file override
getDoctype ( ) : mixed Return DOCTYPE declaration.
getThemeOption ( $name, null $default = null ) : string Get theme option. Options can be viewed or set using UI via Theme options dialog box.
getVariable ( $name ) : null Get view variable value
getVariables ( ) : array Get view variables
registerOverride ( string $source, string $destination ) Register view file override
render ( ) : string Render a view and return HTML, XML, or any other string.
setDoctype ( $doctype ) Set DOCTYPE declaration.
setVariable ( string $name, $value ) Set a single view variable
setVariables ( $variables ) Set view variables
unsetVariable ( $name ) Unset a view variable

Приватные методы

Метод Описание
checkData ( $data )

Описание методов

__construct() публичный метод

Construct view object using specified file and data.
public __construct ( string $file, array $data = [] )
$file string Path to view file. Relative to file where this constructor is executed from.
$data array Array of data to pass to view

__toString() публичный метод

PHP can't handle exceptions in __toString method. Try to avoid it every time possible. Use render() method instead.
public __toString ( ) : string
Результат string

clearOverride() публичный статический метод

Clear registered view file override
public static clearOverride ( $source )
$source

getDoctype() публичный метод

Return DOCTYPE declaration.
public getDoctype ( ) : mixed
Результат mixed

getThemeOption() публичный метод

Get theme option. Options can be viewed or set using UI via Theme options dialog box.
public getThemeOption ( $name, null $default = null ) : string
$name
$default null
Результат string

getVariable() публичный метод

Get view variable value
public getVariable ( $name ) : null
$name
Результат null

getVariables() публичный метод

Get view variables
public getVariables ( ) : array
Результат array

registerOverride() публичный статический метод

Register view file override
public static registerOverride ( string $source, string $destination )
$source string absolute path to the view file to be overriden
$destination string absolute path to the new view file

render() публичный метод

Render a view and return HTML, XML, or any other string.
public render ( ) : string
Результат string

setDoctype() публичный метод

Set DOCTYPE declaration.
public setDoctype ( $doctype )
$doctype

setVariable() публичный метод

Set a single view variable
public setVariable ( string $name, $value )
$name string
$value

setVariables() публичный метод

Set view variables
public setVariables ( $variables )
$variables

unsetVariable() публичный метод

Unset a view variable
public unsetVariable ( $name )
$name

Описание свойств

$overrides защищенное статическое свойство

protected static $overrides