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

Breadcrumb

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

function ContainerBuilder::hash

Computes a reasonably unique hash of a serializable value.

8 calls to ContainerBuilder::hash()
Kernel::getContainerClass in vendor/symfony/http-kernel/Kernel.php
Gets the container class.
PhpDumper::dump in vendor/symfony/dependency-injection/Dumper/PhpDumper.php
Dumps the service container as a PHP class.
SerializerPass::buildChildNameConverterDefinition in vendor/symfony/serializer/DependencyInjection/SerializerPass.php
ServiceLocatorTagPass::processValue in vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php
Processes a value found in a definition tree.
ServiceLocatorTagPass::register in vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php

... See full list

File

vendor/symfony/dependency-injection/ContainerBuilder.php, line 1671

Class

ContainerBuilder
ContainerBuilder is a DI container that provides an API to easily describe services.

Namespace

Symfony\Component\DependencyInjection

Code

public static function hash(mixed $value) : string {
    $hash = substr(base64_encode(hash('xxh128', serialize($value), true)), 0, 7);
    return str_replace([
        '/',
        '+',
    ], [
        '.',
        '_',
    ], $hash);
}

API Navigation

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