private function PhpDumper::startClass in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/Dumper/PhpDumper.php \Symfony\Component\DependencyInjection\Dumper\PhpDumper::startClass()
Adds the class headers.
Parameters
string $class Class name:
string $baseClass The name of the base class:
string $namespace The class namespace:
Return value
string
1 call to PhpDumper::startClass()
- PhpDumper::dump in vendor/
symfony/ dependency-injection/ Dumper/ PhpDumper.php - Dumps the service container as a PHP class.
File
- vendor/
symfony/ dependency-injection/ Dumper/ PhpDumper.php, line 812
Class
- PhpDumper
- PhpDumper dumps a service container as a PHP class.
Namespace
Symfony\Component\DependencyInjection\DumperCode
private function startClass($class, $baseClass, $namespace) {
$bagClass = $this->container
->isFrozen() ? 'use Symfony\\Component\\DependencyInjection\\ParameterBag\\FrozenParameterBag;' : 'use Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBag;';
$namespaceLine = $namespace ? "namespace {$namespace};\n" : '';
return <<<EOF
<?php
{<span class="php-variable">$namespaceLine</span>}
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;
{<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>}
{
private \$parameters;
private \$targetDirs = array();
EOF;
}