/** * Find the file for a class that in PSR-0 or PEAR would be in * $psr_0_root . '/' . $path_fragment . $path_suffix * * @param InjectedApiInterface $api * @param string $logical_base_path * @param string $relative_path * * @return bool|null * TRUE, if the file was found. * FALSE or NULL, otherwise. */ function findFile($api, $logical_base_path, $relative_path) { // Prevent recursion if this is called from libraries_info(). // @todo Find a better way to do this? $backtrace = defined('DEBUG_BACKTRACE_IGNORE_ARGS') ? debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) : debug_backtrace(FALSE); foreach ($backtrace as $call) { if ('libraries_info' === $call['function']) { return FALSE; } } $this->finder->getNamespaceMap()->unregisterDeepPath('', ''); $this->finder->getPrefixMap()->unregisterDeepPath('', ''); $this->registerAllLibraries(); return $this->finder->apiFindFile($api, $api->getClass()); }
/** * {@inheritdoc} */ function apiFindFile($api, $class) { $this->initFinder(); return $this->finder->apiFindFile($api, $class); }