protected function applyToExtensions($callback)
    {
        $results = array();
        foreach (new ApplicationBundleIterator($this->kernel) as $bundle) {
            /* @var $bundle BundleInterface */
            $extension = $bundle->getContainerExtension();
            if ($extension !== null) {
                $results[] = call_user_func($callback, $extension);
            }
        }
        return $results;
    }