src/TaskLoader.php
public static function loadController($class_name)
    {
        foreach (self::$class_folders as $f) {
            $f = rtrim($f, '/');
            $filename = $f . '/' . $class_name . '.php';
            if (file_exists($filename)) {
                require_once $filename;
                if (class_exists($class_name)) {
                    return true;
                } else {
                    throw new TaskManagerException('file found but class ' . $class_name . ' not loaded');
                }
            }
        }

        throw new TaskManagerException('class ' . $class_name . ' not found');
    }
public static function loadController($class_name)
    {
        foreach (self::$class_folders as $f) {
            $f = rtrim($f, '/');
            $filename = $f . '/' . $class_name . '.php';
            if (file_exists($filename)) {
                require_once $filename;
                if (class_exists($class_name)) {
                    return true;
                } else {
                    throw new TaskManagerException('file found but class ' . $class_name . ' not loaded');
                }
            }
        }

        throw new TaskManagerException('class ' . $class_name . ' not found');
    }
public static function loadController ( $ class_name ) { foreach ( self :: $ class_folders as $ f ) { $ f = rtrim ( $ f , '/' ) ; $ filename = $ f . '/' . $ class_name . '.php' ; if ( file_exists ( $ filename ) ) { require_once $ filename ; if ( class_exists ( $ class_name ) ) { return true ; } else { throw new TaskManagerException ( 'file found but class ' . $ class_name . ' not loaded' ) ; } } } throw new TaskManagerException ( 'class ' . $ class_name . ' not found' ) ; }
Looks for and loads required class via require_once
@param $class_name
@return bool
@throws TaskManagerException
Looks for and loads required class via require_once