PHP 8.6.0 Beta 3 is available for testing

Yaf_View_Simple::getScriptPath

(Yaf >=1.0.0)

Yaf_View_Simple::getScriptPathGet the template directory

Опис

public function Yaf_View_Simple::getScriptPath(): string

Gets the directory in which templates are looked up.

Параметри

У цієї функції немає параметрів.

Значення, що повертаються

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

Приклади

Приклад #1 Yaf_View_Simple::getScriptPath() example

<?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();
    }
}
?>

Поданий вище приклад виведе щось схоже на:

/var/www/html/application/views

Прогляньте також

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top