PHP Conference Japan 2024

Yaf_Loader::getNamespacePath

(Yaf >=3.2.0)

Yaf_Loader::getNamespacePathRetieve path of a registered namespace

Açıklama

public Yaf_Loader::getNamespacePath(string $namespaces): string

retrieve path of a registered namespace

Bağımsız Değişkenler

namespace

a string of namespace.

Dönen Değerler

string path, if the namespace is not registered, then null default library will be returned

Örnekler

Örnek 1 Yaf_Loader::registerNamespace()example

<?php
$loader
= Yaf_Loader::getInstance("/var/application/lib");
$loader->registerNamespace("\Vendor\PHP", "/var/lib/php");

$loader->getNamespacePath("\Vendor\PHP"); // '/var/lib/php'
$loader->getNamespacePath("\Vendor\JSP"); // '/var/application/lib'

?>
add a note

User Contributed Notes

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