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
234 * Turns on searching the include path for class files.
256 * that have not been registered with the class map.
266 * Should class lookup fail if not found in the current class map?
314 * Loads the given class or interface.
316 * @param string $class The name of the class
319 public function loadClass($class)
321 if ($file = $this->findFile($class)) {
329 * Finds the path to the file where the class is defined.
331 * @param string $class The name of the class
335 public function findFile($class)
337 // class map lookup
338 if (isset($this->classMap[$class])) {
339 return $this->classMap[$class];
341 if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
345 $file = apcu_fetch($this->apcuPrefix.$class, $hit);
351 $file = $this->findFileWithExtension($class, '.php');
355 $file = $this->findFileWithExtension($class, '.hh');
359 apcu_add($this->apcuPrefix.$class, $file);
363 // Remember that this class does not exist.
364 $this->missingClasses[$class] = true;
370 private function findFileWithExtension($class, $ext)
373 $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
375 $first = $class[0];
377 $subPath = $class;
400 if (false !== $pos = strrpos($class, '\\')) {
401 // namespaced class name
405 // PEAR-like class name
406 $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
411 if (0 === strpos($class, $prefix)) {