Includes the file corresponding with the class name to be autoloaded

@param string $class Class name as defined by PHP autoloading

@return void
1976
protected function includeClass($class)
    {
        $this->updateLog("info", "Setting up {$class} class for inclusion.");

        $class_bits = explode("\\", $class);

        $package       = "";
        $package_stack = array();

        foreach ($class_bits as $bit) {
            $package = $package . $bit . "\\";

            $package_registered = $this->packageRegistered($package);

            if ($package_registered) {
                $package_stack[] = $package;
            }
        }

        $this->loadPackageStack($class, $package_stack);
    }
444756
public static function loadClass($class)
    {
        if (isset(self::$_classMap[$class]))
            return (bool)require sprintf('%s/%s', self::ROOT_DIR, self::$_classMap[$class]);
        return null;
    }
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);
            }
        }
    }
742277
public static function autoload($class)
    {
        $baseRoot = Container::get('config')->get('app_full_path');
        // project-specific namespace prefix
        $prefix = Container::get('config')->get('namespace_prefix');

        // does the class use the namespace prefix?
        $len = strlen($prefix);
        if (strncmp($prefix, $class, $len) !== 0) {
            // no, move to the next registered autoloader
            return;
        }

        // get the relative class name
        $relativeClass = substr($class, $len);

        // replace the namespace prefix with the base directory, replace namespace
        // separators with directory separators in the relative class name, append
        // with .php
        $file = $baseRoot . '/' . str_replace('\\', '/', $relativeClass) . '.php';

        self::import($file);
    }
740696
protected function setClass($class): void
    {
        // @todo fix logic about storing the classname
        $this->className = $class;
        if (is_object($class)) {
            $this->className = get_class($class);
        }
        $this->class = new ReflectionClass($class);
    }
853123
protected function external_autoloader( $classname ) {
		// Convert the namespace to a sub-directory path
		$classname = $this->classname_to_path( $classname );

		// Loop through each autoload-directory
		foreach( $this->get_config('autoload-directories') as $autoload_directory ) {
			// Define our file path
			$file_path = $autoload_directory . $classname . '.php';

			if ( is_readable($file_path) ) {
				require_once( $file_path );

				// We don't want to include multiple versions of the same class,
				// so let's just stop once we find one that exists
				break;
			}
		}
	}
1054267
public function addClass($class)
    {
        $current = preg_split('%\s+%', $this->getAttribute('class'), 0, PREG_SPLIT_NO_EMPTY);
        $added = preg_split('%\s+%', $class, 0, PREG_SPLIT_NO_EMPTY);
        $current = array_merge($current, $added);
        $classes = implode(' ', $current);

        $this->setAttribute('class', $classes);
    }
418179
public function load($file) {
		$this->file = $file;

		$msg = array();
		@include($file);

		$this->msg = $msg;
	}
1249016
public function autoload($className)
    {
        if (0 === strpos($className, $this->prefix)) {
            $parts = explode('\\', substr($className, $this->prefixLength));
            $filepath = $this->directory.DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $parts).'.php';

            if (is_file($filepath)) {
                require $filepath;
            }
        }
    }
81585
public function autoload($class)
    {
        if (!static::$initialized) {
            $this->initialize();
            if ($this->classExists($class)) {
                return TRUE;
            }
        }
        if (\Staq\Util::isStack($class)) {
            $this->loadStackClass($class);
        } else if (\Staq\Util::isParentStack($class)) {
            $this->loadStackParentClass($class);
        }
    }
32053
public static function autoloader($class)
	{
		$path = dirname(__FILE__) . DIRECTORY_SEPARATOR;

		// Amazon SDK classes
		if (strstr($class, 'Amazon'))
		{
			$path .= 'services' . DIRECTORY_SEPARATOR . str_ireplace('Amazon', '', strtolower($class)) . '.class.php';
		}

		// Utility classes
		elseif (strstr($class, 'CF'))
		{
			$path .= 'utilities' . DIRECTORY_SEPARATOR . str_ireplace('CF', '', strtolower($class)) . '.class.php';
		}

		// Load CacheCore
		elseif (strstr($class, 'Cache'))
		{
			if (file_exists($ipath = 'lib' . DIRECTORY_SEPARATOR . 'cachecore' . DIRECTORY_SEPARATOR . 'icachecore.interface.php'))
			{
				require_once($ipath);
			}

			$path .= 'lib' . DIRECTORY_SEPARATOR . 'cachecore' . DIRECTORY_SEPARATOR . strtolower($class) . '.class.php';
		}

		// Load RequestCore
		elseif (strstr($class, 'RequestCore') || strstr($class, 'ResponseCore'))
		{
			$path .= 'lib' . DIRECTORY_SEPARATOR . 'requestcore' . DIRECTORY_SEPARATOR . 'requestcore.class.php';
		}

		// Load Symfony YAML classes
		elseif (strstr($class, 'sfYaml'))
		{
			$path .= 'lib' . DIRECTORY_SEPARATOR . 'yaml' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'sfYaml.php';
		}

		// Fall back to the 'extensions' directory.
		elseif (defined('AWS_ENABLE_EXTENSIONS') && AWS_ENABLE_EXTENSIONS)
		{
			$path .= 'extensions' . DIRECTORY_SEPARATOR . strtolower($class) . '.class.php';
		}

		if (file_exists($path) && !is_dir($path))
		{
			require_once($path);
		}
	}
689265
protected function includeControllersModelsEntities($class) {
        //Include the Extended Classes
        foreach ($this->internalStructure as $Directory) {
            if ($this->includeTheFile ($this->autoloadPath . '/' . $Directory . '/' . $class . '.php')) {
                return true;
            }
        }

        return false;
    }
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];
		}
	}
371307
public static function load($class)
    {
        if (substr($class, 0, 10) !== "Highlight\\") {
            return false;
        }

        $c = str_replace("\\", "/", substr($class, 10)) . ".php";
        $res = include __DIR__ . "/$c";

        return $res == 1 ? true : false;
    }
683698
public function addClass(?string $class): void
  {
    // If class is empty return immediately.
    if ($class===null || $class==='') return;

    if (isset($this->attributes['class']))
    {
      $this->attributes['class'] .= ' ';
      $this->attributes['class'] .= $class;
    }
    else
    {
      $this->attributes['class'] = $class;
    }
  }
769042
public function autoload( $class ) {
		$parent               = explode( '\\', get_class( $this ) );
		$class_array          = explode( '\\', $class );
		$intersect            = array_intersect_assoc( $parent, $class_array );
		$intersect_depth      = count( $intersect );
		$autoload_match_depth = static::$autoload_ns_match_depth;
		// Confirm $class is in same namespace as this autoloader.
		if ( $intersect_depth >= $autoload_match_depth ) {
			$file = $this->get_file_name_from_class( $class );
			if ( 'classmap' === static::$autoload_type && is_array( $this->autoload_dir ) ) {
				foreach ( $this->autoload_dir as $dir ) {
					$this->load_file( $this->installed_dir . $dir . $file );
				}
			} else {
				$this->load_file( $this->installed_dir . $file );
			}
		}

	}
818370
public static function autoload( $class ) 
    {    
        // Verify that the base namespace is Amarkal
        if (0 !== strpos($class, __NAMESPACE__)) {
            return;
        }
        // UI classes
        if( strpos( $class, "Amarkal\UI\Components" ) === 0 )
        {
            $class .= "\controller";
        }
        // Widget UI classes
        if( strpos( $class, "Amarkal\Extensions\WordPress\Widget\UI" ) === 0 )
        {
            $class .= "\controller";
        }
        // Options UI classes
        if( strpos( $class, "Amarkal\Extensions\WordPress\Options\UI" ) === 0 )
        {
            $class .= "\controller";
        }
        
        $fileName = dirname(__FILE__).str_replace(array(__NAMESPACE__, '\\'), array('',DIRECTORY_SEPARATOR), $class).'.php';
        
        if ( is_file( $fileName ) ) {
            require $fileName;
            return true;
        }
        else return false;
    }