Mvc\View::__set

public __set (mixed $key, mixed $value) Magic method to pass variables to the views $this->view->products = $products;

Mvc\View::setLayoutsDir

public setLayoutsDir (mixed $layoutsDir) Sets the layouts sub-directory. Must be a directory under the views directory. Depending of your platform, always add a trailing slash or backslash $view->setLayoutsDir('../common/layouts/');

Mvc\View::setRenderLevel

public setRenderLevel (mixed $level) Sets the render level for the view //Render the view related to the controller only $this->view->setRenderLevel(View::LEVEL_LAYOUT);

Mvc\View::setMainView

public setMainView (mixed $viewPath) Sets default view name. Must be a file without extension in the views directory //Renders as main view views-dir/base.phtml $this->view->setMainView('base');

Mvc\View::setParamToView

public setParamToView (mixed $key, mixed $value) Adds parameters to views (alias of setVar) $this->view->setParamToView('products', $products);

Mvc\View::setTemplateAfter

public setTemplateAfter (mixed $templateAfter) Sets a “template after” controller layout

Mvc\View::setTemplateBefore

public setTemplateBefore (mixed $templateBefore) Sets a template before the controller layout

Mvc\View::setPartialsDir

public setPartialsDir (mixed $partialsDir) Sets a partials sub-directory. Must be a directory under the views directory. Depending of your platform, always add a trailing slash or backslash $view->setPartialsDir('../common/partials/');

Mvc\View::render

public render (string $controllerName, string $actionName, [array $params]) Executes render process from dispatching data // Shows recent posts view (app/views/posts/recent.phtml) $view->start()->render('posts', 'recent')->finish();

Mvc\View::setBasePath

public setBasePath (mixed $basePath) Sets base path. Depending of your platform, always add a trailing slash or backslash $view->setBasePath(__DIR__ . '/');