PHP 8.4.26 Released!

Yaf_View_Simple::getScriptPath

(Yaf >=1.0.0)

Yaf_View_Simple::getScriptPath — Get the template directory

Beschreibung

public function Yaf_View_Simple::getScriptPath(): string

Gets the directory in which templates are looked up.

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Rückgabewerte

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

Beispiele

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

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

/var/www/html/application/views

Siehe auch

+add a note

User Contributed Notes

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