Documentation

Class Phalcon\Mvc\View\Engine\Php

extends abstract class Phalcon\Mvc\View\Engine

implements Phalcon\Mvc\View\EngineInterface, Phalcon\Di\InjectionAwareInterface, Phalcon\Events\EventsAwareInterface

Source on GitHub

Adapter to use PHP itself as templating engine

Methods

public render (string $path, array $params, [boolean $mustClean])

Renders a view using the template engine

public __construct (Phalcon\Mvc\ViewInterface $view, [Phalcon\DiInterface $dependencyInjector]) inherited from Phalcon\Mvc\View\Engine

Phalcon\Mvc\View\Engine constructor

public array getContent () inherited from Phalcon\Mvc\View\Engine

Returns cached ouput on another view stage

public startSection (string $name) inherited from Phalcon\Mvc\View\Engine

Start a new section block

public string stopSection () inherited from Phalcon\Mvc\View\Engine

Stop the current section block

public string|null section (string $name, [unknown $defaultValue]) inherited from Phalcon\Mvc\View\Engine

Returns the content for a section block

public string partial (string $partialPath) inherited from Phalcon\Mvc\View\Engine

Renders a partial inside another view

public Phalcon\Mvc\ViewInterface getView () inherited from Phalcon\Mvc\View\Engine

Returns the view component related to the adapter

public Phalcon\Mvc\View\Engine addMethod (string $name, Closure $handler) inherited from Phalcon\Mvc\View\Engine

Adds a user-defined method

public mixed __call (string $method, [array $arguments]) inherited from Phalcon\Mvc\View\Engine

Handles method calls when a method is not implemented

public setDI (Phalcon\DiInterface $dependencyInjector) inherited from Phalcon\Di\Injectable

Sets the dependency injector

public Phalcon\DiInterface getDI ([unknown $error], [unknown $notUseDefault]) inherited from Phalcon\Di\Injectable

Returns the internal dependency injector

public setEventsManager (Phalcon\Events\ManagerInterface $eventsManager) inherited from Phalcon\Di\Injectable

Sets the event manager

public Phalcon\Events\ManagerInterface getEventsManager () inherited from Phalcon\Di\Injectable

Returns the internal event manager

public boolean fireEvent (string $eventName, [mixed $data], [unknown $cancelable]) inherited from Phalcon\Di\Injectable

Fires an event, implicitly calls behaviors and listeners in the events manager are notified

public mixed fireEventCancel (string $eventName, [mixed $data], [unknown $cancelable]) inherited from Phalcon\Di\Injectable

Fires an event, can stop the event by returning to the false

public boolean hasService (string $name) inherited from Phalcon\Di\Injectable

Check whether the DI contains a service by a name

public Phalcon\Di\ServiceInterface setService (unknown $name) inherited from Phalcon\Di\Injectable

Sets a service from the DI

public object|null getService (unknown $name) inherited from Phalcon\Di\Injectable

Obtains a service from the DI

public mixed getResolveService (string $name, [array $args], [unknown $noerror], [unknown $noshared]) inherited from Phalcon\Di\Injectable

Resolves the service based on its configuration

public attachEvent (string $eventType, Closure $callback) inherited from Phalcon\Di\Injectable

Attach a listener to the events

public __get (unknown $property) inherited from Phalcon\Di\Injectable

Magic method __get

public __sleep () inherited from Phalcon\Di\Injectable

...

public __debugInfo () inherited from Phalcon\Di\Injectable

...