OptimizedPhpArrayDumper::$serialize

Same name in other branches
  1. 9 core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper::serialize
  2. 8.9.x core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper::serialize
  3. 11.x core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper::serialize

Whether to serialize service definitions or not.

Service definitions are serialized by default to avoid having to unserialize the whole container on loading time, which improves early bootstrap performance for e.g. the page cache.

Type: bool

File

core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php, line 49

Class

OptimizedPhpArrayDumper
OptimizedPhpArrayDumper dumps a service container as a serialized PHP array.

Namespace

Drupal\Component\DependencyInjection\Dumper

Code

protected $serialize = TRUE;

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