php8.5
Home/ Manual/ yaf / yaf_view_simple/ Yaf_View_Simple::getScriptPath

Yaf_View_Simple::getScriptPath

PHP function Edit on GitHub ✎

(Yaf >=1.0.0)

Get the template directory

Description

Yaf_View_Simple::getScriptPath(): string

Gets the directory in which templates are looked up.

Parameters Parameters

Return Values

The template directory as a string, or null if it has not been set yet.

Examples

Yaf_View_Simple::getScriptPath example

php
<?php
class IndexController extends Yaf_Controller_Abstract
{
    public function indexAction()
    {
        /* the directory in which templates are looked up,
         * usually application.view.directory */
        echo $this->getView()->getScriptPath();
    }
}
?>

The above example will output something similar to:

output
/var/www/html/application/views

See Also

  • Yaf_View_Simple::setScriptPath

Source: reference/yaf/yaf_view_simple/getscriptpath.xml · from the official PHP manual (php/doc-en)