Skip to content

Commit

Permalink
Merge branch '2.2'
Browse files Browse the repository at this point in the history
* 2.2: (22 commits)
  fixed doc references (closes #7515)
  fixed doc references (closes #7515)
  On OS X, sys_get_tmp_dir() returns /var/private/..., which really is below /private/var.
  Doctrine cannot handle bare random non-utf8 strings
  small changes
  [SecurityBundle] Fixed configuration exemple
  idAsIndex should be true with a smallint or bigint id field.
  [PropertyAccess] Remove trailing periods from doc blocks
  Fix param docs for PropertyAccessor read method
  Fixed long multibyte parameter logging in DbalLogger:startQuery
  Keep the file extension in the temporary copy and test that it exists (closes #7482)
  bumped Symfony version to 2.1.10-DEV
  [Validator][translation][japanese]replaced period to japanese one [Validator][translation][japanese]fixed japanese translation to more practical one [Validator][translation][japanese]fixed message ordering to be consistent with other languages [Validator][translation][japanese]added new validation messages in japanese translation
  updated VERSION for 2.1.9
  update CONTRIBUTORS for 2.1.9
  updated CHANGELOG for 2.1.9
  [Security] fixed wrong interface
  Remove already defined arguments
  Add missing use
  [FrameworkBundle] Reuse definition variable in FormPass
  ...

Conflicts:
	src/Symfony/Bridge/Doctrine/Logger/DbalLogger.php
	src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/config.html.twig
  • Loading branch information
fabpot committed Apr 1, 2013
2 parents 4ee864e + 3bfc8fd commit fadf322
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions DataCollector/ConfigDataCollector.php
Expand Up @@ -25,10 +25,24 @@
class ConfigDataCollector extends DataCollector class ConfigDataCollector extends DataCollector
{ {
private $kernel; private $kernel;
private $name;
private $version;


/** /**
* Constructor. * Constructor.
* *
* @param string $name The name of the application using the web profiler
* @param string $version The version of the application using the web profiler
*/
public function __construct($name = null, $version = null)
{
$this->name = $name;
$this->version = $version;
}

/**
* Sets the Kernel associated with this Request.
*
* @param KernelInterface $kernel A KernelInterface instance * @param KernelInterface $kernel A KernelInterface instance
*/ */
public function setKernel(KernelInterface $kernel = null) public function setKernel(KernelInterface $kernel = null)
Expand All @@ -42,6 +56,8 @@ public function setKernel(KernelInterface $kernel = null)
public function collect(Request $request, Response $response, \Exception $exception = null) public function collect(Request $request, Response $response, \Exception $exception = null)
{ {
$this->data = array( $this->data = array(
'app_name' => $this->name,
'app_version' => $this->version,
'token' => $response->headers->get('X-Debug-Token'), 'token' => $response->headers->get('X-Debug-Token'),
'symfony_version' => Kernel::VERSION, 'symfony_version' => Kernel::VERSION,
'name' => isset($this->kernel) ? $this->kernel->getName() : 'n/a', 'name' => isset($this->kernel) ? $this->kernel->getName() : 'n/a',
Expand All @@ -64,6 +80,16 @@ public function collect(Request $request, Response $response, \Exception $except
} }
} }


public function getApplicationName()
{
return $this->data['app_name'];
}

public function getApplicationVersion()
{
return $this->data['app_version'];
}

/** /**
* Gets the token. * Gets the token.
* *
Expand Down

0 comments on commit fadf322

Please sign in to comment.