(Yaf >=1.0.0)
Yaf_Loader::isLocalName — Whether a class is local
Determine whether a class name should be looked up in the local library directory, i.e. whether its prefix belongs to a registered local namespace.
class_nameThe class name to check.
Returns true if the class name belongs to a registered local namespace, false otherwise.
Example #1 Yaf_Loader::isLocalName() example
<?php
$app = new Yaf_Application(__DIR__ . "/conf/application.ini");
$loader = Yaf_Loader::getInstance();
$loader->registerLocalNamespace(array("Models", "Services"));
var_dump($loader->isLocalName("Models_Product"));
var_dump($loader->isLocalName("Vendor_Session"));
?>The above example will output something similar to:
bool(true) bool(false)