DataCollector/ContainerDataCollector.php
public function collect(Request $request, Response $response, \Exception $exception = null)
    {
        $parameters = array();
        $services = array();

        $this->loadContainerBuilder();

        if ($this->containerBuilder !== false) {
            foreach ($this->containerBuilder->getParameterBag()->all() as $key => $value) {
                $service = substr($key, 0, strpos($key, '.'));
                if (!isset($parameters[$service])) {
                    $parameters[$service] = array();
                }
                $parameters[$service][$key] = $value;
            }

            $serviceIds = $this->containerBuilder->getServiceIds();
            foreach ($serviceIds as $serviceId) {
                $definition = $this->resolveServiceDefinition($serviceId);

                if ($definition instanceof Definition && $definition->isPublic()) {
                    $services[$serviceId] = array('class' => $definition->getClass());
                } elseif ($definition instanceof Alias) {
                    $services[$serviceId] = array('alias' => $definition);
                } else {
                    continue;    // We don't want private services
                }
            }

            ksort($services);
            ksort($parameters);
        }
        $this->data['parameters'] = $parameters;
        $this->data['services'] = $services;
    }
public function collect(Request $request, Response $response, \Exception $exception = null)
    {
        $parameters = array();
        $services = array();

        $this->loadContainerBuilder();

        if ($this->containerBuilder !== false) {
            foreach ($this->containerBuilder->getParameterBag()->all() as $key => $value) {
                $service = substr($key, 0, strpos($key, '.'));
                if (!isset($parameters[$service])) {
                    $parameters[$service] = array();
                }
                $parameters[$service][$key] = $value;
            }

            $serviceIds = $this->containerBuilder->getServiceIds();
            foreach ($serviceIds as $serviceId) {
                $definition = $this->resolveServiceDefinition($serviceId);

                if ($definition instanceof Definition && $definition->isPublic()) {
                    $services[$serviceId] = array('class' => $definition->getClass());
                } elseif ($definition instanceof Alias) {
                    $services[$serviceId] = array('alias' => $definition);
                } else {
                    continue;    // We don't want private services
                }
            }

            ksort($services);
            ksort($parameters);
        }
        $this->data['parameters'] = $parameters;
        $this->data['services'] = $services;
    }
public function collect ( Request $ request , Response $ response , \ Exception $ exception = null ) { $ parameters = array ( ) ; $ services = array ( ) ; $ this -> loadContainerBuilder ( ) ; if ( $ this -> containerBuilder !== false ) { foreach ( $ this -> containerBuilder -> getParameterBag ( ) -> all ( ) as $ key => $ value ) { $ service = substr ( $ key , 0 , strpos ( $ key , '.' ) ) ; if ( ! isset ( $ parameters [ $ service ] ) ) { $ parameters [ $ service ] = array ( ) ; } $ parameters [ $ service ] [ $ key ] = $ value ; } $ serviceIds = $ this -> containerBuilder -> getServiceIds ( ) ; foreach ( $ serviceIds as $ serviceId ) { $ definition = $ this -> resolveServiceDefinition ( $ serviceId ) ; if ( $ definition instanceof Definition && $ definition -> isPublic ( ) ) { $ services [ $ serviceId ] = array ( 'class' => $ definition -> getClass ( ) ) ; } elseif ( $ definition instanceof Alias ) { $ services [ $ serviceId ] = array ( 'alias' => $ definition ) ; } else { continue ; // We don't want private services } } ksort ( $ services ) ; ksort ( $ parameters ) ; } $ this -> data [ 'parameters' ] = $ parameters ; $ this -> data [ 'services' ] = $ services ; }
Collect information about services and parameters from the cached dumped xml container

@param Request    $request   The Request Object
@param Response   $response  The Response Object
@param \Exception $exception The Exception
Collect information about services and parameters from the cached dumped xml container