Give a class name and it will require the file.

@param  string $class
@return bool
353728
public static function autoload($class)
    {
        if (0 === strpos($class, 'Bitpay\\')) {
            $classname = substr($class, 7);

            $file = __DIR__.DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $classname).'.php';

            if (is_file($file) && is_readable($file)) {
                require_once $file;

                return true;
            }

            throw new \Exception(sprintf('Class "%s" Not Found', $class));
        }
    }
1067688
public function findFile($class)
    {
        if (xcache_isset($this->prefix.$class)) {
            $file = xcache_get($this->prefix.$class);
        } else {
            xcache_set($this->prefix.$class, $file = $this->classFinder->findFile($class));
        }

        return $file;
    }
184111
private function loadCachedClass($class)
    {
        $result = false;

        if (isset($this->cache[$class])) {
            $result = include $this->cache[$class];

            if ($result === false) {
                unset($this->cache[$class]);
                $this->saveCache();
            }
        }

        return $result !== false;
    }
440773
public static function loadClass($class) {
    	
        //The current namespace prefix
        $prefix = $class;

        //Work backwards through the namespace names of the fully-qualified class name to find a mapped file name
        while(false !== $pos = strrpos($prefix, '\\')) {

            //Retain the trailing namespace separator in the prefix
            $prefix = substr($class, 0, $pos + 1);

            //The rest is the relative class name
            $relative_class = substr($class, $pos + 1);

            //Try to load a mapped file for the prefix and relative class
            $mapped_file = static :: loadMappedFile($prefix, $relative_class);

            if(false !== $mapped_file) {
                return $mapped_file;
            }

            //Remove the trailing namespace separator for the next iteration of strrpos()
            $prefix = rtrim($prefix, '\\');
        }

        //Never found a mapped file
        return false;
    }
130361
public function resolveClass( $class )
	{
		if ( !is_string( $class ) )
			throw new ResolverException( "Class must be a string" );

		// Check if a class has been mapped to a key
		if ( array_key_exists( $class, $this->classAlias ) )
			try
			{
				return $this->resolve( null, $this->classAlias[$class] );
			}
			catch ( ResolverException $e )
			{
				// Ignore
			}

		// Check if the class has been initialized
		foreach ( $this->instances as $instance )
			if ( get_class( $instance ) == $class )
				return $instance;

		// TODO Other methods to check?

		return false;
	}
1114075
public function hasClass(string $class): bool {
        return (bool)$this->collection()->reduce(function($carry, $node) use ($class) {
            $attr = $node->getAttr('class');

            return array_reduce(explode(' ', (string)$attr), function($carry, $item) use ($class) {
                if (strcasecmp($item, $class) == 0) {
                    return true;
                }

                return $carry;
            }, false);
        }, false);
    }
898882
public function resolve($class)
    {
        $result = false;
        $prefix = $class;

        while (false !== ($pos = strrpos($prefix, '\\'))) {
            $prefix = substr($class, 0, $pos + 1);

            if (isset($this->prefixes[$prefix])) {
                $result = $this->resolveFilename($prefix, str_replace('\\', '/', substr($class, $pos + 1)));

                if ($result !== false) {
                    break;
                }
            }

            $prefix = rtrim($prefix, '\\');
        }

        return $result;
    }
986452
protected function autoload($class) {
		$class=$this->fixslashes(ltrim($class,'\\'));
		/** @var callable $func */
		$func=NULL;
		if (is_array($path=$this->hive['AUTOLOAD']) &&
			isset($path[1]) && is_callable($path[1]))
			list($path,$func)=$path;
		foreach ($this->split($this->hive['PLUGINS'].';'.$path) as $auto)
			if ($func && is_file($file=$func($auto.$class).'.php') ||
				is_file($file=$auto.$class.'.php') ||
				is_file($file=$auto.strtolower($class).'.php') ||
				is_file($file=strtolower($auto.$class).'.php'))
				return require($file);
	}
22643
public static function load($class)
	{
		//		var_dump('Alcys\\' . $class);
		if(array_key_exists($class, self::$classes) && is_file(self::$classes[$class]))
		{
			require_once self::$classes[$class];
		}
		elseif(array_key_exists('Alcys\\' . $class, self::$classes) && is_file(self::$classes[$class]))
		{
			require_once self::$classes['Alcys\\' . $class];
		}
	}
719023
public function loadClass(string $class)
    {
        if (strpos($class, 'Proxy\__Transactional__\\') !== 0) {
            return null;
        }

        if ($file = $this->findProxyFile($class)) {
            require_once $file;

            return true;
        }

        return null;
    }
936775
protected function get_file_name( $class ) {
		if ( $class ) {
			$file   = explode( '\\', $class );
			$file   = strtolower( end( $file ) );
			$file__ = str_replace( '_', '-', $file );
			$files  = array(
				$file . '.php', // File Name With _.
				$file__ . '.php', // File Name With - which is replaced by _.
				'class-' . $file__ . '.php', // File name With Class Prefixed.
				'class_' . $file__ . '.php', // File Name With - which is replaced by _.
			);
			return $files;
		}
		return false;
	}
466818
protected function needAliasForClassName($class, $namespace)
    {
        if ($namespace == $this->getNamespace()) {
            return false;
        }

        if (str_replace('\\Base', '', $namespace) == str_replace('\\Base', '', $this->getNamespace())) {
            return true;
        }

        if (empty($namespace) && 'Base' === $this->getNamespace()) {
            if (str_replace(['Query'], '', $class) == str_replace(['Query'], '', $this->getUnqualifiedClassName())) {
                return true;
            }

            if ((false !== strpos($class, 'Query'))) {
                return true;
            }

            // force alias for model without namespace
            if (false === array_search($class, $this->whiteListOfDeclaredClasses, true)) {
                return true;
            }
        }

        if ('Base' === $namespace && '' === $this->getNamespace()) {
            // force alias for model without namespace
            if (false === array_search($class, $this->whiteListOfDeclaredClasses, true)) {
                return true;
            }
        }

        return false;
    }
602757
public function loadClass($class)
    {
        if (array_key_exists($class, $aliases = $this->classAliasList->getRegisteredAliases())) {
            // we have an alias for it, but we don't have it yet loaded
            // (because after all, we're in the auto loader.)
            $fullClass = $aliases[$class];
            if (!class_exists($fullClass, false)) {
                spl_autoload_call($fullClass);
            }
            // finally, we set up a class alias for this list. We do this now because
            // we don't know earlier what namespace it'll be in
            class_alias($fullClass, $class);
        }
    }
604299
public function autoload( $class ) {

		// Iterate over namespaces to find a match.
		foreach ( $this->namespaces as $namespace ) {

			// Move on if the object does not belong to the current namespace.
			if ( 0 !== strpos( $class, $namespace['root'] ) ) {
				continue;
			}

			// Remove namespace root level to correspond with root filesystem, and
			// replace the namespace separator "\" by the system-dependent directory separator.
			$filename = str_replace(
				array( $namespace['root'], '\\' ),
				array( '', DIRECTORY_SEPARATOR ),
				$class
			);

			// Remove a leading backslash from the class name.
			$filename = $this->remove_leading_backslash( $filename );

			// Change to lower case if requested.
			if ( $namespace['lowercase'] ) {
				$filename = strtolower( $filename );
			}

			// Change underscores into hyphens if requested.
			if ( $namespace['underscores'] ) {
				$filename = str_replace( '_', '-', $filename );
			}

			// Add base_dir, prefix and suffix.
			$filepath = $namespace['base_dir']
				. $namespace['prefix']
				. $filename
				. $namespace['suffix'];

			// Throw an exception if the file does not exist or is not readable.
			if ( is_readable( $filepath ) ) {
				require_once $filepath;
			}
		}
	}
183399
public function findFile(string $class)
    {
        // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
        if ('\\' === $class[0]) {
            $class = (string)\substr($class, 1);
        }

        // class map lookup
        if (isset($this->classMap[$class])) {
            return $this->classMap[$class];
        }

        $file = $this->findFileWithExtension($class, '.php');

        if (false === $file) {
            // Remember that this class does not exist.
            $this->missingClasses[$class] = true;
        }

        return $file;
    }
497098
public static function load($class)
	{
		$class = static::normalizeClass($class);

		foreach (static::$directories as $directory)
		{
			if (file_exists($path = $directory . DIRECTORY_SEPARATOR . $class))
			{
				require_once $path;

				return true;
			}

			if (file_exists($path = $directory . DIRECTORY_SEPARATOR . strtolower($class)))
			{
				require_once $path;

				return true;
			}
		}

		return false;
	}
775436
public function findFile($class)
    {
        if (false === $file = apc_fetch($this->prefix.$class)) {
            apc_store($this->prefix.$class, $file = parent::findFile($class));
        }

        return $file;
    }