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

Breadcrumb

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

class CompiledClassMetadataCacheWarmer

@author Fabien Bourigault <bourigaultfabien@gmail.com>

Hierarchy

  • class \Symfony\Component\Serializer\CacheWarmer\CompiledClassMetadataCacheWarmer implements \Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface

Expanded class hierarchy of CompiledClassMetadataCacheWarmer

File

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

Namespace

Symfony\Component\Serializer\CacheWarmer
View source
final class CompiledClassMetadataCacheWarmer implements CacheWarmerInterface {
    public function __construct(array $classesToCompile, ClassMetadataFactoryInterface $classMetadataFactory, ClassMetadataFactoryCompiler $classMetadataFactoryCompiler, Filesystem $filesystem) {
    }
    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 [];
    }
    public function isOptional() : bool {
        return true;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
CompiledClassMetadataCacheWarmer::isOptional public function Checks whether this warmer is optional or not. Overrides CacheWarmerInterface::isOptional
CompiledClassMetadataCacheWarmer::warmUp public function Warms up the cache. Overrides WarmableInterface::warmUp
CompiledClassMetadataCacheWarmer::__construct public function
RSS feed
Powered by Drupal