/**
  * 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().
   foreach (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) 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());
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 function apiFindFile($api, $class)
 {
     $this->initFinder();
     return $this->finder->apiFindFile($api, $class);
 }