\Hazaar\View
Layout
Summary
Methods Properties Constants
add
key
set
yn
No constants
Properties
$_content
$_content
$_links
$_links
$_postItems
$_postItems
$_priority
$_priority
$_rendered_views
$_rendered_views
$_requires
$_requires
$_requires_param
$_requires_param
$_views
$_views
Methods
__construct()
__construct($view = null)

Parameters

$view

No description

add()
add($view, $key = null) : \Hazaar\View
Add a view to the layout

This method will add a view based on the supplied argument. If the argument is a string a new Hazaar\View object is created using the view file named in the argument. Alterntively, the argument can be a Hazaar\View object which will simply then be added to the layout.

Parameters

$view

No description

$key

No description

Returns

\Hazaar\View
addPost()
addPost($item)

Parameters

$item

No description

current()
current()
import()
import()
key()
key()
layout()
layout() : string
Render the views contained in this layout view

Returns

string
link()
link($href, $rel = null)

Parameters

$href

No description

$rel

No description

next()
next()
offsetExists()
offsetExists($offset)

Parameters

$offset

No description

offsetGet()
offsetGet($offset)

Parameters

$offset

No description

offsetSet()
offsetSet($offset, $value)

Parameters

$offset

No description

$value

No description

offsetUnset()
offsetUnset($offset)

Parameters

$offset

No description

post()
post()
prepare()
prepare($merge_data = true)

Parameters

$merge_data

No description

remove()
remove($key)

Parameters

$key

No description

render()
render()
Render the layout with an optional prepare method
requires()
requires($script, $charset = null)

Parameters

$script

No description

$charset

No description

rewind()
rewind()
setContent()
setContent($content)

Parameters

$content

No description

setImportPriority()
setImportPriority($priority)

Parameters

$priority

No description

valid()
valid()
Inherited
partialLoop()
partialLoop($view, $data) : string
Render a partial view multiple times on an array

Parameters

$viewmixed

The partial view to render

$dataarray

A data array. Usually multi-dimensional

Returns

string
Inherited
populate()
populate($array)

Parameters

$array

No description

Inherited
registerController()
registerController($controller)
Registers a controller on the view for method callbacks.

Tags

Deprecated

Replaced by Hazaar\View::registerMethodHandler().

Parameters

$controller

No description

Inherited
registerMethodHandler()
registerMethodHandler($handler)
Registers an object on the view for method callbacks.

Tags

Throws

\Exception

Parameters

$handler

No description

Inherited
remove()
remove($key)

Parameters

$key

No description

Inherited
removeHelper()
removeHelper($helper)

Parameters

$helper

No description

Inherited
render()
render()
Inherited
runHelpers()
runHelpers()
Inherited
script()
script($code)

Parameters

$code

No description

Inherited
set()
set($key, $value)

Parameters

$key

No description

$value

No description

Inherited
setRequiresParam()
setRequiresParam($array)

Parameters

$array

No description

InheritedStatic
timestamp()
timestamp($value) : string
Return a date/time type as a timestamp string.

This is for making it quick and easy to output consistent timestamp strings.

Parameters

$valuemixed

No description

Returns

string
Inherited
yn()
yn($value, $labels = Array ( [0] => Yes ) ) : string
Returns 'Yes' or 'No' text based on a boolean value

Parameters

$valuemixed

The boolean value

$labelsmixed

Optionally specify your own yes/no text to display

Returns

string