Lines Matching refs:class

16  * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
30 * In this example, if you try to use a class in the Symfony\Component
32 * the autoloader will first look for the class under the component/
36 * This class is loosely based on the Symfony UniversalClassLoader.
43 class ClassLoader
315 * Turns on searching the include path for class files.
339 * that have not been registered with the class map.
351 * Should class lookup fail if not found in the current class map?
420 * Loads the given class or interface.
422 * @param string $class The name of the class
425 public function loadClass($class)
427 if ($file = $this->findFile($class)) {
437 * Finds the path to the file where the class is defined.
439 * @param string $class The name of the class
443 public function findFile($class)
445 // class map lookup
446 if (isset($this->classMap[$class])) {
447 return $this->classMap[$class];
449 if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
453 $file = apcu_fetch($this->apcuPrefix.$class, $hit);
459 $file = $this->findFileWithExtension($class, '.php');
463 $file = $this->findFileWithExtension($class, '.hh');
467 apcu_add($this->apcuPrefix.$class, $file);
471 // Remember that this class does not exist.
472 $this->missingClasses[$class] = true;
489 * @param string $class
493 private function findFileWithExtension($class, $ext)
496 $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
498 $first = $class[0];
500 $subPath = $class;
523 if (false !== $pos = strrpos($class, '\\')) {
524 // namespaced class name
528 // PEAR-like class name
529 $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
534 if (0 === strpos($class, $prefix)) {