ServiceProviderInterface.php

Same filename in other branches
  1. 8.9.x core/lib/Drupal/Core/DependencyInjection/ServiceProviderInterface.php
  2. 10 core/lib/Drupal/Core/DependencyInjection/ServiceProviderInterface.php
  3. 11.x core/lib/Drupal/Core/DependencyInjection/ServiceProviderInterface.php

Namespace

Drupal\Core\DependencyInjection

File

core/lib/Drupal/Core/DependencyInjection/ServiceProviderInterface.php

View source
<?php

namespace Drupal\Core\DependencyInjection;


/**
 * Interface that all service providers must implement.
 *
 * @ingroup container
 */
interface ServiceProviderInterface {
    
    /**
     * Registers services to the container.
     *
     * @param ContainerBuilder $container
     *   The ContainerBuilder to register services to.
     */
    public function register(ContainerBuilder $container);

}

Interfaces

Title Deprecated Summary
ServiceProviderInterface Interface that all service providers must implement.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.