Loads the given class, interface or trait.

We'll return true if it was loaded.

@param string $class

@return bool
180599
public function loadClass($class)
    {
        foreach (spl_autoload_functions() as $func) {
            if (is_array($func) && $func[0] === $this) {
                continue;
            }
            $this->classList->push($class);
            if (call_user_func($func, $class)) {
                break;
            }
        }

        $this->classList->next();

        return true;
    }
1065446
public function loader($class)
    {
        if (isset($this->aliases[$class])) {
            class_alias($this->aliases[$class], $class);
            return;
        }

        if ($this->namespacing) {
            if ($alias = $this->getNamespaceAlias($class)) {
                class_alias($this->aliases[$alias], $class);
            }
        }
    }
561759
public function loadClass($class)
    {
        if ((true === $this->apc && ($file = $this->findFileInApc($class))) or
            ($file = $this->findFile($class))
        ) {
            require_once $file;
        }
    }
569309
public static function loadByPsr0($class)
    {
        $existsBefore = class_exists($class, false);
        $success = parent::loadByPsr0($class);
        if (!$existsBefore && class_exists($class, false)) {
            self::injectStaticDependencies($class);
        }

        return $success;
    }
479678
public static function load($class) 
	{
		if (substr($class, 0, 8)=='Ripcord_') 
		{
			$root = dirname(__FILE__).'/ripcord_';
			$class = substr($class, 8);
			$file = str_replace('.', '', $class);
			$file = str_replace('_', '/', $file);
			$file = strtolower($file);
			while ($file && $file!='.') 
			{
				if ( file_exists($root.$file.'.php') ) 
				{
					require_once($root.$file.'.php');
					return true;
				} else {
					$file = dirname($file);
				}
			}
		}
		return false;
	}
1284172
public static function autoload($class)
    {
        // Don't interfere with other autoloaders
        if (0 !== strpos($class, 'Swift_')) {
            return;
        }

        $path = __DIR__.'/'.str_replace('_', '/', $class).'.php';

        if (!file_exists($path)) {
            return;
        }

        require $path;

        if (self::$inits && !self::$initialized) {
            self::$initialized = true;
            foreach (self::$inits as $init) {
                call_user_func($init);
            }
        }
    }
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));
        }
    }
277059
public static function autoload($class)
    {
        /**
         * Classes from unified namespace canot be loaded by this auto loader.
         * Do not try to load them in order to avoid strange errors in edge cases.
         */
        if (false !== strpos($class, 'OxidEsales\Eshop\\')) {
            return false;
        }
        $instance = static::getInstance();

        $class = strtolower(basename($class));

        if ($classPath = $instance->getFilePath($class)) {
            include $classPath;
        } else {
            $class = preg_replace('/_parent$/i', '', $class);

            if (!in_array($class, $instance->triedClasses)) {
                $instance->triedClasses[] = $class;
                $instance->createExtensionClassChain($class);
            }
        }
    }
973140
public function loadClass($className)
    {
        if (self::typeExists($className)) {
            return true;
        }

        if ( ! $this->canLoadClass($className)) {
            return false;
        }

        require($this->includePath !== null ? $this->includePath . DIRECTORY_SEPARATOR : '')
               . str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $className)
               . $this->fileExtension;

        return self::typeExists($className);
    }
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;
    }
724489
public static function onAutoLoad($class)
    {
        if (isset(self::$customMappings[$class])) {
            require_once(self::$customMappings[$class]);

            return true;
        }

        if (self::$_namespaces !== null) {
            foreach (self::$_namespaces as $data) {
                $ns = $data[0];

                $nsl = $data[2];


                if (substr($class, 0, $nsl) !== $ns) {
                    continue;
                }

                $dir = $data[1];
                $ext = $data[3];

                $file = $dir . str_replace('\\', '/', substr($class, $nsl)) . $ext;

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

                    return true;
                }
            }
        }

        return false;
    }
834364
public static function registerCoreClass(string $class): bool
    {
        if (class_exists($class) === false) {
            return false;
        }
        $check = new ReflectionClass($class);
        if ($check->implementsInterface("TheCMSThread\\Classes\\Core") === true) {
            self::$core_class = $class;
            return true;
        } else {
            return false;
        }
    }
1316837
public static function load($class)
    {
        // Get just class name without ns
        $className = self::getOnlyClass($class);
        // Get just ns without class name
        $nameSpace = self::getOnlyNameSpace($class);

        // If this is not core class
        if ($nameSpace != __NAMESPACE__) {
            // Convert namespace to base directory add class
            $path = __SAMSON_VENDOR_PATH . str_replace('\\', DIRECTORY_SEPARATOR, $nameSpace) . DIRECTORY_SEPARATOR . $className . '.php';

            // Load class by file name
            if (file_exists($path)) {
                //elapsed('Autoloading class '.$class.' at '.$path);
                require_once($path);
                // old school compatibility will be removed when old modules will be updated
            } else if (self::oldModule($className, $nameSpace, $path)) {
                //elapsed('Autoloading(old style) class '.$class.' at '.$path);
                require_once($path);
                // Handle old module loading
            } else { // Signal error
                return e('Class name ## not found', E_SAMSON_CORE_ERROR, $class);
            }

        } else { // Load core classes separately using this class location
            require_once(__DIR__ . '/' . $className . '.php');
        }

        return true;
    }
1208094
public function load_class( $class ) {
		$class = ltrim( $class, '\\' );
		$dir   = null;

		if ( ! isset( $this->_property_instances['define'] ) ) {
			$namespace = ucfirst( TECHNOTE_PLUGIN );
			if ( preg_match( "#\A{$namespace}#", $class ) ) {
				$class = preg_replace( "#\A{$namespace}#", '', $class );
				$dir   = $this->app->get_library_directory() . DS . 'src';
			}
		} elseif ( preg_match( "#\A{$this->define->plugin_namespace}#", $class ) ) {
			$class = preg_replace( "#\A{$this->define->plugin_namespace}#", '', $class );
			$dir   = $this->define->plugin_src_dir;
		} elseif ( preg_match( "#\A{$this->define->lib_namespace}#", $class ) ) {
			$class = preg_replace( "#\A{$this->define->lib_namespace}#", '', $class );
			$dir   = $this->define->lib_src_dir;
		}

		if ( isset( $dir ) ) {
			$class = ltrim( $class, '\\' );
			$class = strtolower( $class );
			$path  = $dir . DS . str_replace( '\\', DS, $class ) . '.php';
			if ( is_readable( $path ) ) {
				/** @noinspection PhpIncludeInspection */
				require_once $path;

				return true;
			}
		}

		return false;
	}
1168840
private function loadAssetsManager($class)
    {
        if (isset($this->assetsMergerInstances[$class])) {
            return true;
        }

        $merger = $this->objectsFactory->buildAssetsMerger($class, $this->loadedConfigurator);

        if ($merger === false) {
            $this->loadedLogger->warning('Could not load ' . $class . ' merger.');

            return false;
        }

        $this->assetsMergerInstances[$class] = $merger;
        $this->loadedLogger->debug('Assets merger ' . $class . ' found & loaded.');

        return true;
    }
1267762
public function load($class)
    {
        $result = false;

        //Get the path
        $path = $this->getPath( $class, $this->_base_path);

        if ($path !== false)
        {
            if (!in_array($path, get_included_files()) && file_exists($path))
            {
                require $path;

                if($this->_debug)
                {
                    if(!$this->isDeclared($class))
                    {
                        throw new RuntimeException(sprintf(
                            'The autoloader expected class "%s" to be defined in file "%s".
                            The file was found but the class was not in it, the class name
                            or namespace probably has a typo.', $class, $path
                        ));
                    }
                }
            }
            else $result = false;
        }

        return $result;
    }
535443
public function hasClass($class = null)
    {
        if ($class !== null) {
            $classes = explode(' ', $this->getClass());
            return in_array($class, $classes);
        } else {
            return $this->hasAttribute('class');
        }
    }