Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Yaf_View_Interface::setScriptPathYaf_View_Simple::assign>
^YafLast updated: Mon, 26 Oct 2026

The Yaf_View_Simple class

(Yaf >=1.0.0)

Introduction

Yaf_View_Simple is the built-in template engine in Yaf, it is a simple but fast template engine, and only support PHP script template.

Class synopsis

class Yaf_View_Simple implements Yaf_View_Interface {
/* Properties */
protected $_tpl_vars;
protected $_tpl_dir;
/* Methods */
publicfunction __construct(string $template_dir, array $options = NULL)
public function assign(mixed $name, mixed $value = NULL): bool
public function assignRef(string $name, mixed $value): bool
public function clear(string $name = NULL): bool
public function display(string $tpl, array $vars = NULL): bool
public function eval(string $tpl_content, array $vars = NULL): string
public function get(string $name = NULL): mixed
public function getScriptPath(): string
public function __isset(string $name): bool
public function render(string $tpl, array $vars = NULL): string
public function __set(string $name, mixed $value): void
public function setScriptPath(string $template_dir): Yaf_View_Simple
}

Properties

_tpl_vars

_tpl_dir

Table of Contents


<Yaf_View_Interface::setScriptPathYaf_View_Simple::assign>
^YafLast updated: Mon, 26 Oct 2026