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

Breadcrumb

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

function CompiledClassMetadataCacheWarmer::warmUp

Overrides WarmableInterface::warmUp

File

vendor/symfony/serializer/CacheWarmer/CompiledClassMetadataCacheWarmer.php, line 32

Class

CompiledClassMetadataCacheWarmer
@author Fabien Bourigault <bourigaultfabien@gmail.com>

Namespace

Symfony\Component\Serializer\CacheWarmer

Code

public function warmUp(string $cacheDir, ?string $buildDir = null) : array {
    $metadatas = [];
    foreach ($this->classesToCompile as $classToCompile) {
        $metadatas[] = $this->classMetadataFactory
            ->getMetadataFor($classToCompile);
    }
    $code = $this->classMetadataFactoryCompiler
        ->compile($metadatas);
    $this->filesystem
        ->dumpFile("{$cacheDir}/serializer.class.metadata.php", $code);
    return [];
}

API Navigation

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