PHP Class Pagekit\View\Helper\ScriptHelper

Inheritance: implements Pagekit\View\Helper\HelperInterface, implements IteratorAggregate
Show file Open project: pagekit/pagekit

Protected Properties

Property Type Description
$scripts Pagekit\View\Asset\AssetManager

Public Methods

Method Description
__call ( string $method, array $args ) : mixed Proxies all method calls to the manager.
__construct ( Pagekit\View\Asset\AssetManager $scripts = null ) Constructor.
__invoke ( $name, $source = null, $dependencies = [], $options = [] ) Add shortcut.
getIterator ( ) : ArrayIterator Returns an iterator for script tags.
getName ( )
register ( View $view )
render ( ) : string Renders the script tags.

Method Details

__call() public method

Proxies all method calls to the manager.
public __call ( string $method, array $args ) : mixed
$method string
$args array
return mixed

__construct() public method

Constructor.
public __construct ( Pagekit\View\Asset\AssetManager $scripts = null )
$scripts Pagekit\View\Asset\AssetManager

__invoke() public method

Add shortcut.
See also: add()
public __invoke ( $name, $source = null, $dependencies = [], $options = [] )

getIterator() public method

Returns an iterator for script tags.

getName() public method

public getName ( )

register() public method

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

render() public method

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

Property Details

$scripts protected property

protected AssetManager,Pagekit\View\Asset $scripts
return Pagekit\View\Asset\AssetManager