Core/Framework/Amvc/App/AppHandler.php
public function autodiscover($path)
    {
        if (!is_array($path)) {
            $path = (array) $path;
        }

        foreach ($path as $apps_dir) {

            if (is_dir($apps_dir)) {

                if (($dh = opendir($apps_dir)) !== false) {

                    while (($name = readdir($dh)) !== false) {

                        if ($name{0} == '.' || $name == 'Core' || is_file($apps_dir . '/' . $name)) {
                            continue;
                        }

                        $app = $this->getAppInstance($name);
                    }

                    closedir($dh);
                }
            }
        }
    }
public function autodiscover($path)
    {
        if (!is_array($path)) {
            $path = (array) $path;
        }

        foreach ($path as $apps_dir) {

            if (is_dir($apps_dir)) {

                if (($dh = opendir($apps_dir)) !== false) {

                    while (($name = readdir($dh)) !== false) {

                        if ($name{0} == '.' || $name == 'Core' || is_file($apps_dir . '/' . $name)) {
                            continue;
                        }

                        $app = $this->getAppInstance($name);
                    }

                    closedir($dh);
                }
            }
        }
    }
public function autodiscover ( $ path ) { if ( ! is_array ( $ path ) ) { $ path = ( array ) $ path ; } foreach ( $ path as $ apps_dir ) { if ( is_dir ( $ apps_dir ) ) { if ( ( $ dh = opendir ( $ apps_dir ) ) !== false ) { while ( ( $ name = readdir ( $ dh ) ) !== false ) { if ( $ name { 0 } == '.' || $ name == 'Core' || is_file ( $ apps_dir . '/' . $ name ) ) { continue ; } $ app = $ this -> getAppInstance ( $ name ) ; } closedir ( $ dh ) ; } } } }
Autodiscovers installed apps in the given path

When an app is found an instance of it will be created.

@param string|array $path
Path to check for apps. Can be an array of paths
Autodiscovers installed apps in the given path