PHP 8.4.26 Released!

Yaf_Controller_Abstract::getViewpath

(Yaf >=1.0.0)

Yaf_Controller_Abstract::getViewpath — Get the view path

Beschreibung

public function Yaf_Controller_Abstract::getViewpath(): ?string

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

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Rückgabewerte

The view template directory as a String.

Beispiele

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

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

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

Siehe auch

+add a note

User Contributed Notes

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