Lines Matching defs: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
243 * Turns on searching the include path for class files.
265 * that have not been registered with the class map.
275 * Should class lookup fail if not found in the current class map?
338 * Loads the given class or interface.
340 * @param string $class The name of the class
343 public function loadClass($class)
345 if ($file = $this->findFile($class)) {
353 * Finds the path to the file where the class is defined.
355 * @param string $class The name of the class
359 public function findFile($class)
361 // class map lookup
362 if (isset($this->classMap[$class])) {
363 return $this->classMap[$class];
365 if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
369 $file = apcu_fetch($this->apcuPrefix.$class, $hit);
375 $file = $this->findFileWithExtension($class, '.php');
379 $file = $this->findFileWithExtension($class, '.hh');
383 apcu_add($this->apcuPrefix.$class, $file);
387 // Remember that this class does not exist.
388 $this->missingClasses[$class] = true;
404 private function findFileWithExtension($class, $ext)
407 $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
409 $first = $class[0];
411 $subPath = $class;
434 if (false !== $pos = strrpos($class, '\\')) {
435 // namespaced class name
439 // PEAR-like class name
440 $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
445 if (0 === strpos($class, $prefix)) {