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_Controller_Abstract::getViewYaf_Controller_Abstract::init>
^Yaf_Controller_AbstractLast updated: Mon, 26 Oct 2026

Yaf_Controller_Abstract::getViewpath

(Yaf >=1.0.0)

Yaf_Controller_Abstract::getViewpath — Get the view path

Description

public function Yaf_Controller_Abstract::getViewpath(): ?string

Returns the template directory used by the view engine bound to this controller.

Parameters

This function has no parameters.

Return Values

The view template directory as a string.

Examples

Example #1 Yaf_Controller_Abstract::getViewpath() example

<?php
class ProductController extends Yaf_Controller_Abstract
{
    public function indexAction() {
        // the template directory used by the view engine,
        // e.g. "/var/www/html/application/views"
        var_dump($this->getViewpath());
    }
}
?>

The above example will output something similar to:

string(31) "/var/www/html/application/views"

See Also


<Yaf_Controller_Abstract::getViewYaf_Controller_Abstract::init>
^Yaf_Controller_AbstractLast updated: Mon, 26 Oct 2026