use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new AppBundle\AppBundle(), ); return $bundles; } public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load(__DIR__.'/config/config.yml'); } }
use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new AppBundle\AppBundle(), new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), ); return $bundles; } public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load(__DIR__.'/config/config.yml'); $loader->load(__DIR__.'/config/services.yml'); } }This code introduces a new bundle, `SensioFrameworkExtraBundle()`, that provides extra functionality for the framework. The new bundle is registered along with the other bundles in the `registerBundles()` method, while additional configuration settings are loaded in the `registerContainerConfiguration()`. In summary, AppKernel is a powerful PHP package library that simplifies the integration of bundles and services in Symfony applications. The library provides an intuitive framework for organizing code structure, making it easier to maintain and scale applications.