PHP Class Pagekit\View\Helper\DataHelper

Inheritance: implements Pagekit\View\Helper\HelperInterface
显示文件 Open project: pagekit/pagekit

Protected Properties

Property Type Description
$data array
$encodingOptions integer 15 === JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT

Public Methods

Method Description
__invoke ( $name, $value ) Add shortcut.
add ( string $name, mixed $value ) : self Adds a data value to an existing key name.
get ( null | string $name = null ) : array Gets the data values or a value by name.
getName ( )
register ( View $view )
render ( ) : string Renders the data tags.

Method Details

__invoke() public method

Add shortcut.
See also: add()
public __invoke ( $name, $value )

add() public method

Adds a data value to an existing key name.
public add ( string $name, mixed $value ) : self
$name string
$value mixed
return self

get() public method

Gets the data values or a value by name.
public get ( null | string $name = null ) : array
$name null | string
return array

getName() public method

public getName ( )

register() public method

public register ( View $view )
$view Pagekit\View\View

render() public method

Renders the data tags.
public render ( ) : string
return string

Property Details

$data protected_oe property

protected array $data
return array

$encodingOptions protected_oe property

15 === JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT
protected int $encodingOptions
return integer