private function PhpDumper::startClass

Adds the class headers.

Parameters

string $class Class name:

string $baseClass The name of the base class:

Return value

string

1 call to PhpDumper::startClass()
PhpDumper::dump in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
Dumps the service container as a PHP class.

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php, line 621

Class

PhpDumper
PhpDumper dumps a service container as a PHP class.

Namespace

Symfony\Component\DependencyInjection\Dumper

Code

private function startClass($class, $baseClass) {
  $bagClass = $this->container
    ->isFrozen() ? 'use Symfony\\Component\\DependencyInjection\\ParameterBag\\FrozenParameterBag;' : 'use Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBag;';
  return <<<EOF
<?php

use Symfony\\Component\\DependencyInjection\\ContainerInterface;
use Symfony\\Component\\DependencyInjection\\Container;
use Symfony\\Component\\DependencyInjection\\Exception\\InactiveScopeException;
use Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException;
use Symfony\\Component\\DependencyInjection\\Exception\\LogicException;
use Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException;
use Symfony\\Component\\DependencyInjection\\Reference;
use Symfony\\Component\\DependencyInjection\\Parameter;
{<span class="php-variable">$bagClass</span>}

/**
 * {<span class="php-variable">$class</span>}
 *
 * This class has been auto-generated
 * by the Symfony Dependency Injection Component.
 */
class {<span class="php-variable">$class</span>} extends {<span class="php-variable">$baseClass</span>}
{
EOF;
}