function OptimizedPhpArrayDumper::getParameters

Same name in other branches
  1. 9 core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper::getParameters()
  2. 8.9.x core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper::getParameters()
  3. 10 core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper::getParameters()

Gets parameters of the container as a PHP array.

Return value

array The escaped and prepared parameters of the container.

1 call to OptimizedPhpArrayDumper::getParameters()
OptimizedPhpArrayDumper::getArray in core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php
Gets the service container definition as a PHP array.

File

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

Class

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

Namespace

Drupal\Component\DependencyInjection\Dumper

Code

protected function getParameters() {
    if (!$this->container
        ->getParameterBag()
        ->all()) {
        return [];
    }
    $parameters = $this->container
        ->getParameterBag()
        ->all();
    $is_compiled = $this->container
        ->isCompiled();
    return $this->prepareParameters($parameters, $is_compiled);
}

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