protected function arrangeBundlesForEnvironment()
    {
        foreach ($this->autoloaderCollection as $autoloader) {
            $autoloaderBundles = $autoloader->getBundles();
            foreach ($autoloaderBundles as $environment => $bundles) {
                foreach ($bundles as $bundle) {
                    $this->environmentsBundles[$environment][] = $bundle;
                }
            }
        }
        
        $this->register('all');
        $this->register($this->environment);
        $this->orderBundles();
    }