You are here

function xautoload_ClassLoader_ApcCache::findFile in X Autoload 7.3

For compatibility, it is possible to use the class loader as a finder.

Parameters

string $class: The class to find.

Return value

string File where the class is assumed to be.

Overrides xautoload_ClassLoader_NoCache::findFile

2 calls to xautoload_ClassLoader_ApcCache::findFile()
xautoload_ClassLoader_ApcAggressive::findFile in lib/ClassLoader/ApcAggressive.php
Find the file where we expect a class to be defined.
xautoload_ClassLoader_ApcCache::loadClass in lib/ClassLoader/ApcCache.php
Callback for class loading. This will include ("require") the file found.
1 method overrides xautoload_ClassLoader_ApcCache::findFile()
xautoload_ClassLoader_ApcAggressive::findFile in lib/ClassLoader/ApcAggressive.php
Find the file where we expect a class to be defined.

File

lib/ClassLoader/ApcCache.php, line 58

Class

xautoload_ClassLoader_ApcCache

Code

function findFile($class) {
  if (FALSE === ($file = apc_fetch($this->prefix . $class)) || !empty($file) && !is_file($file)) {

    // Resolve cache miss.
    if ($file = parent::findFile($class)) {
      apc_store($this->prefix . $class, $file);
    }
  }
  return $file;
}