PHP code example of ppokatilo / services-loader

1. Go to this page and download the library: Download ppokatilo/services-loader library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ppokatilo / services-loader example snippets




namespace You\YourBundle\DependencyInjection;

use SHyx0rmZ\ServicesLoader\ServicesLoader;

class YourExtension extends Extension
{
  public function load(array $config, ContainerBuilder $container)
  {
    $loader = new ServiceLoader($container);
    $loader->loadFromFile(__DIR__ . '/../Resources/config/services.ini');
    $loader->loadFromDirectory(__DIR__ . '/../Resources/config/services.d');
  }
}



namespace You\YourBundle\DependencyInjection;

use SHyx0rmZ\ServicesLoader\Extension\ServicesLoaderExtension;

class YourExtension extends ServicesLoaderExtension
{
}