protected function init($pathToRoot, $pathToApplication)
    {
        // Check for root folder runtimeEnvironment
        // null = try to detect root | true = use const DOOZR_DOCUMENT_ROOT | ELSE = take path from parameter
        switch ($pathToRoot) {
            case null:
                $pathToRoot = str_replace(
                    str_replace('_', DIRECTORY_SEPARATOR, __CLASS__).'.php',
                    '',
                    __FILE__
                );
                break;

            case 'DOOZR':
                // break intentionally omitted
            default:
                $pathToRoot = DOOZR_DOCUMENT_ROOT;
                break;
        }

        // Retrieve path to application
        if (null === $pathToApplication) {
            $pathToApplication = $this->retrievePathToApplication();
        }

        // Init important paths from framework and app, setup include paths to speedup PHPs lookups
        $this
            ->initPaths($pathToRoot, $pathToApplication)
            ->configureIncludePaths();
    }
protected function init($pathToRoot, $pathToApplication)
    {
        // Check for root folder runtimeEnvironment
        // null = try to detect root | true = use const DOOZR_DOCUMENT_ROOT | ELSE = take path from parameter
        switch ($pathToRoot) {
            case null:
                $pathToRoot = str_replace(
                    str_replace('_', DIRECTORY_SEPARATOR, __CLASS__).'.php',
                    '',
                    __FILE__
                );
                break;

            case 'DOOZR':
                // break intentionally omitted
            default:
                $pathToRoot = DOOZR_DOCUMENT_ROOT;
                break;
        }

        // Retrieve path to application
        if (null === $pathToApplication) {
            $pathToApplication = $this->retrievePathToApplication();
        }

        // Init important paths from framework and app, setup include paths to speedup PHPs lookups
        $this
            ->initPaths($pathToRoot, $pathToApplication)
            ->configureIncludePaths();
    }
protected function init ( $ pathToRoot , $ pathToApplication ) { // Check for root folder runtimeEnvironment // null = try to detect root | true = use const DOOZR_DOCUMENT_ROOT | ELSE = take path from parameter switch ( $ pathToRoot ) { case null : $ pathToRoot = str_replace ( str_replace ( '_' , DIRECTORY_SEPARATOR , __CLASS__ ) . '.php' , '' , __FILE__ ) ; break ; case 'DOOZR' : // break intentionally omitted default : $ pathToRoot = DOOZR_DOCUMENT_ROOT ; break ; } // Retrieve path to application if ( null === $ pathToApplication ) { $ pathToApplication = $ this -> retrievePathToApplication ( ) ; } // Init important paths from framework and app, setup include paths to speedup PHPs lookups $ this -> initPaths ( $ pathToRoot , $ pathToApplication ) -> configureIncludePaths ( ) ; }
initializes all required operations.

This method is intend to begin retrieving the current document root of Doozr. Afterwards
it retrieves the path to the Application and setup all required default and include paths.

@param string|null $pathToRoot        Path to Doozr (DOOZR_DOCUMENT_ROOT)
@param string|null $pathToApplication Path to applications root directory

@author Benjamin Carl <opensource@clickalicious.de>
initializes all required operations .