PHP 8.6.0 Beta 3 is available for testing

Yaf_Loader::getLibraryPath

(Yaf >=2.1.4)

Yaf_Loader::getLibraryPathRetrieve the library path

Beschreibung

public function Yaf_Loader::getLibraryPath(bool $is_global = false): string

Retrieve the library directory.

Parameter-Liste

is_global

Whether to retrieve the global library directory instead of the local one.

Rückgabewerte

The library directory as a string, or an empty string when the global library directory is requested but not set.

Beispiele

Beispiel #1 Yaf_Loader::getLibraryPath() example

<?php
$loader = Yaf_Loader::getInstance(
    "/var/www/shop/application/library",
    "/usr/local/share/yaf/library"
);

/* the local library directory */
echo $loader->getLibraryPath(), PHP_EOL;

/* the global library directory */
echo $loader->getLibraryPath(true), PHP_EOL;
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

/var/www/shop/application/library
/usr/local/share/yaf/library

Siehe auch

add a note

User Contributed Notes

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