PHP Class Pagekit\View\View

Afficher le fichier Open project: pagekit/pagekit Class Usage Examples

Protected Properties

Свойство Type Description
$engine Symfony\Component\Templating\EngineInterface
$events Pagekit\Event\EventDispatcherInterface
$globals array
$helpers Pagekit\View\Helper\HelperInterface[]
$parameters array[]

Méthodes publiques

Méthode Description
__call ( string $name, array $args ) : mixed Gets a helper or calls the helpers invoke method.
__construct ( Pagekit\Event\EventDispatcherInterface $events = null, Symfony\Component\Templating\EngineInterface $engine = null ) Constructor.
__get ( string $name ) : mixed Gets a global parameter.
__invoke ( $name, array $parameters = [] ) Render shortcut.
addEngine ( Symfony\Component\Templating\EngineInterface $engine ) : self Adds a templating engine.
addGlobal ( string $name, mixed $value ) : self Adds a global parameter.
addHelper ( Pagekit\View\Helper\HelperInterface $helper ) : self Adds a view helper.
addHelpers ( array $helpers ) : self Adds multiple view helpers.
getEngine ( ) : array Gets the templating engine.
getGlobals ( ) : array Gets the global parameters.
on ( string $event, callable $listener, integer $priority ) Adds an event listener.
render ( $name, array $parameters = [] )
trigger ( string $event, array $arguments = [] ) : Pagekit\Event\EventInterface Triggers an event.

Method Details

__call() public méthode

Gets a helper or calls the helpers invoke method.
public __call ( string $name, array $args ) : mixed
$name string
$args array
Résultat mixed

__construct() public méthode

Constructor.
public __construct ( Pagekit\Event\EventDispatcherInterface $events = null, Symfony\Component\Templating\EngineInterface $engine = null )
$events Pagekit\Event\EventDispatcherInterface
$engine Symfony\Component\Templating\EngineInterface

__get() public méthode

Gets a global parameter.
public __get ( string $name ) : mixed
$name string
Résultat mixed

__invoke() public méthode

Render shortcut.
See also: render()
public __invoke ( $name, array $parameters = [] )
$parameters array

addEngine() public méthode

Adds a templating engine.
public addEngine ( Symfony\Component\Templating\EngineInterface $engine ) : self
$engine Symfony\Component\Templating\EngineInterface
Résultat self

addGlobal() public méthode

Adds a global parameter.
public addGlobal ( string $name, mixed $value ) : self
$name string
$value mixed
Résultat self

addHelper() public méthode

Adds a view helper.
public addHelper ( Pagekit\View\Helper\HelperInterface $helper ) : self
$helper Pagekit\View\Helper\HelperInterface
Résultat self

addHelpers() public méthode

Adds multiple view helpers.
public addHelpers ( array $helpers ) : self
$helpers array
Résultat self

getEngine() public méthode

Gets the templating engine.
public getEngine ( ) : array
Résultat array

getGlobals() public méthode

Gets the global parameters.
public getGlobals ( ) : array
Résultat array

on() public méthode

Adds an event listener.
public on ( string $event, callable $listener, integer $priority )
$event string
$listener callable
$priority integer

render() public méthode

public render ( $name, array $parameters = [] )
$parameters array

trigger() public méthode

Triggers an event.
public trigger ( string $event, array $arguments = [] ) : Pagekit\Event\EventInterface
$event string
$arguments array
Résultat Pagekit\Event\EventInterface

Property Details

$engine protected_oe property

protected EngineInterface,Symfony\Component\Templating $engine
Résultat Symfony\Component\Templating\EngineInterface

$events protected_oe property

protected EventDispatcherInterface,Pagekit\Event $events
Résultat Pagekit\Event\EventDispatcherInterface

$globals protected_oe property

protected array $globals
Résultat array

$helpers protected_oe property

protected HelperInterface[],Pagekit\View\Helper $helpers
Résultat Pagekit\View\Helper\HelperInterface[]

$parameters protected_oe property

protected array[] $parameters
Résultat array[]