Core/Framework/Amvc/App/AbstractApp.php
protected function initPaths(array $exclude_dirs = [])
    {
        $apps_dir = $this->core->config->get('Core', 'dir.apps');
        $apps_url = $this->core->config->get('Core', 'url.apps');

        // Set path property which can be used on including additional app files like settings, routes, config etc
        $dir = $this->getDir();

        // Get directory path of app
        $scanned_directory = array_diff(scandir($dir), array(
            '..',
            '.'
        ));

        $this->paths = new Paths();

        $dir = $this->getDir();

        $string = new CamelCase('');

        foreach ($scanned_directory as $item) {

            if (is_dir($dir . '/' . $item) && !in_array($item, $exclude_dirs)) {

                $string->setString($item);
                $key = $string->uncamelize();

                $this->paths->add('dir.' . $key, $dir . '/' . $item);
                $this->paths->add('url.' . $key, $apps_url . '/' . $this->name . '/' . $item);
            }
        }

        // Add apps base dir and url to app config
        $this->paths->add('dir.app', $dir);
        $this->paths->add('url.app', $apps_url . '/' . $this->name);
    }
protected function initPaths(array $exclude_dirs = [])
    {
        $apps_dir = $this->core->config->get('Core', 'dir.apps');
        $apps_url = $this->core->config->get('Core', 'url.apps');

        // Set path property which can be used on including additional app files like settings, routes, config etc
        $dir = $this->getDir();

        // Get directory path of app
        $scanned_directory = array_diff(scandir($dir), array(
            '..',
            '.'
        ));

        $this->paths = new Paths();

        $dir = $this->getDir();

        $string = new CamelCase('');

        foreach ($scanned_directory as $item) {

            if (is_dir($dir . '/' . $item) && !in_array($item, $exclude_dirs)) {

                $string->setString($item);
                $key = $string->uncamelize();

                $this->paths->add('dir.' . $key, $dir . '/' . $item);
                $this->paths->add('url.' . $key, $apps_url . '/' . $this->name . '/' . $item);
            }
        }

        // Add apps base dir and url to app config
        $this->paths->add('dir.app', $dir);
        $this->paths->add('url.app', $apps_url . '/' . $this->name);
    }
protected function initPaths ( array $ exclude_dirs = [ ] ) { $ apps_dir = $ this -> core -> config -> get ( 'Core' , 'dir.apps' ) ; $ apps_url = $ this -> core -> config -> get ( 'Core' , 'url.apps' ) ; // Set path property which can be used on including additional app files like settings, routes, config etc $ dir = $ this -> getDir ( ) ; // Get directory path of app $ scanned_directory = array_diff ( scandir ( $ dir ) , array ( '..' , '.' ) ) ; $ this -> paths = new Paths ( ) ; $ dir = $ this -> getDir ( ) ; $ string = new CamelCase ( '' ) ; foreach ( $ scanned_directory as $ item ) { if ( is_dir ( $ dir . '/' . $ item ) && ! in_array ( $ item , $ exclude_dirs ) ) { $ string -> setString ( $ item ) ; $ key = $ string -> uncamelize ( ) ; $ this -> paths -> add ( 'dir.' . $ key , $ dir . '/' . $ item ) ; $ this -> paths -> add ( 'url.' . $ key , $ apps_url . '/' . $ this -> name . '/' . $ item ) ; } } // Add apps base dir and url to app config $ this -> paths -> add ( 'dir.app' , $ dir ) ; $ this -> paths -> add ( 'url.app' , $ apps_url . '/' . $ this -> name ) ; }
Initializes the apps paths by creating the paths and writing them into the apps config.

@param array $exclude_dirs
Optional list of directories to skip
Initializes the apps paths by creating the paths and writing them into the apps config .