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();
    }