Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ReverseContainer.php

function ReverseContainer::recordContainer

Records a map of the container's services.

This method is used so that stale services can be serialized after a container has been re-initialized.

File

core/lib/Drupal/Component/DependencyInjection/ReverseContainer.php, line 71

Class

ReverseContainer
Retrieves service IDs from the container for public services.

Namespace

Drupal\Component\DependencyInjection

Code

public function recordContainer() : void {
    $service_recorder = \Closure::bind(function () : array {
        return $this->services;
    }, $this->serviceContainer, $this->serviceContainer);
    self::$recordedServices = array_merge(self::$recordedServices, array_flip(array_map([
        $this,
        'generateServiceIdHash',
    ], $service_recorder())));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal