public static function loadComponents()
    {
        $com = new Component();
        $file = new FileHandling();
        $diskScan = array_diff(scandir(route()->com), ['..', '.']);
        foreach ($diskScan as $scans) {
            $configFile = route()->com.$scans.'/component.json';
            if (file_exists($configFile)) {
                $c = $file->open($configFile, 'readOnly')->read();
                $file->close();
                $config = json_decode($c, true);
                if ($config['status'] === true) {
                    require_once route()->com.$scans.'/routes.php';
                }
            }
        }
        require_once 'dispatcher.php';
    }
public static function loadComponents()
    {
        $com = new Component();
        $file = new FileHandling();
        $diskScan = array_diff(scandir(route()->com), ['..', '.']);
        foreach ($diskScan as $scans) {
            $configFile = route()->com.$scans.'/component.json';
            if (file_exists($configFile)) {
                $c = $file->open($configFile, 'readOnly')->read();
                $file->close();
                $config = json_decode($c, true);
                if ($config['status'] === true) {
                    require_once route()->com.$scans.'/routes.php';
                }
            }
        }
        require_once 'dispatcher.php';
    }
public static function loadComponents ( ) { $ com = new Component ( ) ; $ file = new FileHandling ( ) ; $ diskScan = array_diff ( scandir ( route ( ) -> com ) , [ '..' , '.' ] ) ; foreach ( $ diskScan as $ scans ) { $ configFile = route ( ) -> com . $ scans . '/component.json' ; if ( file_exists ( $ configFile ) ) { $ c = $ file -> open ( $ configFile , 'readOnly' ) -> read ( ) ; $ file -> close ( ) ; $ config = json_decode ( $ c , true ) ; if ( $ config [ 'status' ] === true ) { require_once route ( ) -> com . $ scans . '/routes.php' ; } } } require_once 'dispatcher.php' ; }
Load the components.

@since 1.9.7

@return void
Load the components .