bound('debugbar')) { $this->debugbar = $app['debugbar']; } else { $this->debugbar = null; } } /** * {@inheritDoc} */ public function getName() { return 'stopwatch'; } public function getTokenParsers() { return [ /* * {% stopwatch foo %} * Some stuff which will be recorded on the timeline * {% endstopwatch %} */ new StopwatchTokenParser($this->debugbar !== null), ]; } public function getDebugbar() { return $this->debugbar; } }