Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch '2.2'

* 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...
commit fadf32218038ba2f8530a54baf2a5bc2b41a868d 2 parents 4ee864e + 3bfc8fd
@fabpot fabpot authored
Showing with 26 additions and 0 deletions.
  1. +26 −0 DataCollector/ConfigDataCollector.php
View
26 DataCollector/ConfigDataCollector.php
@@ -25,10 +25,24 @@
class ConfigDataCollector extends DataCollector
{
private $kernel;
+ private $name;
+ private $version;
/**
* 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
*/
public function setKernel(KernelInterface $kernel = null)
@@ -42,6 +56,8 @@ public function setKernel(KernelInterface $kernel = null)
public function collect(Request $request, Response $response, \Exception $exception = null)
{
$this->data = array(
+ 'app_name' => $this->name,
+ 'app_version' => $this->version,
'token' => $response->headers->get('X-Debug-Token'),
'symfony_version' => Kernel::VERSION,
'name' => isset($this->kernel) ? $this->kernel->getName() : 'n/a',
@@ -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.
*
Please sign in to comment.
Something went wrong with that request. Please try again.