DataCollector/TwigDataCollector.php
public function collectTemplateData($templateName, $parameters, $templatePath = null)
    {
        $collectedParameters = array();
        foreach ($parameters as $name => $value) {
            $collectedParameters[$name] = array(
                'type' => in_array(gettype($value), array('object', 'resource')) ? get_class($value) : gettype($value),
                'value' => in_array(gettype($value), array('object', 'resource', 'array')) ? null : $value,
            );
        }

        $this->data['templates'][] = array(
            'name'       => $templateName,
            'path'       => $templatePath,
            'parameters' => $collectedParameters
        );
    }
public function collectTemplateData($templateName, $parameters, $templatePath = null)
    {
        $collectedParameters = array();
        foreach ($parameters as $name => $value) {
            $collectedParameters[$name] = array(
                'type' => in_array(gettype($value), array('object', 'resource')) ? get_class($value) : gettype($value),
                'value' => in_array(gettype($value), array('object', 'resource', 'array')) ? null : $value,
            );
        }

        $this->data['templates'][] = array(
            'name'       => $templateName,
            'path'       => $templatePath,
            'parameters' => $collectedParameters
        );
    }
public function collectTemplateData ( $ templateName , $ parameters , $ templatePath = null ) { $ collectedParameters = array ( ) ; foreach ( $ parameters as $ name => $ value ) { $ collectedParameters [ $ name ] = array ( 'type' => in_array ( gettype ( $ value ) , array ( 'object' , 'resource' ) ) ? get_class ( $ value ) : gettype ( $ value ) , 'value' => in_array ( gettype ( $ value ) , array ( 'object' , 'resource' , 'array' ) ) ? null : $ value , ) ; } $ this -> data [ 'templates' ] [ ] = array ( 'name' => $ templateName , 'path' => $ templatePath , 'parameters' => $ collectedParameters ) ; }
Collects data on the twig templates rendered

@param mixed $templateName The template name
@param array $parameters   The array of parameters passed to the template
@param array $templatePath The template path
Collects data on the twig templates rendered