| @@ 21-43 (lines=23) @@ | ||
| 18 | * |
|
| 19 | * Controller to render a debug dump of the registered services in the Veto Service Container. |
|
| 20 | */ |
|
| 21 | class ContainerDebugController extends AbstractController |
|
| 22 | { |
|
| 23 | /** |
|
| 24 | * @return Response |
|
| 25 | */ |
|
| 26 | public function containerDebug() |
|
| 27 | { |
|
| 28 | // The templates for showing exceptions are outside of the normal application |
|
| 29 | // template path. It is therefore necessary to specify the path here. |
|
| 30 | $this->get('php_template_engine')->addPath( |
|
| 31 | __DIR__ . '/../Resources/ContainerDebug' |
|
| 32 | ); |
|
| 33 | ||
| 34 | // Render the template |
|
| 35 | $response = $this->get('php_template_engine')->render('List.html.php', array( |
|
| 36 | 'services' => $this->container->getDefinitions() |
|
| 37 | )); |
|
| 38 | ||
| 39 | return new Response($response); |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||
| @@ 21-43 (lines=23) @@ | ||
| 18 | * |
|
| 19 | * Controller to render a debug dump of the registered listeners on the event dispatcher service. |
|
| 20 | */ |
|
| 21 | class ListenersDebugController extends AbstractController |
|
| 22 | { |
|
| 23 | /** |
|
| 24 | * @return Response |
|
| 25 | */ |
|
| 26 | public function listenersDebug() |
|
| 27 | { |
|
| 28 | // The templates for showing exceptions are outside of the normal application |
|
| 29 | // template path. It is therefore necessary to specify the path here. |
|
| 30 | $this->get('php_template_engine')->addPath( |
|
| 31 | __DIR__ . '/../Resources/ListenersDebug' |
|
| 32 | ); |
|
| 33 | ||
| 34 | // Render the template |
|
| 35 | $response = $this->get('php_template_engine')->render('List.html.php', array( |
|
| 36 | 'listeners' => $this->container->get('dispatcher')->getListeners() |
|
| 37 | )); |
|
| 38 | ||
| 39 | return new Response($response); |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||
| @@ 21-41 (lines=21) @@ | ||
| 18 | * |
|
| 19 | * Controller to render a debug dump of the registered layers in the application. |
|
| 20 | */ |
|
| 21 | class LayersDebugController extends AbstractController |
|
| 22 | { |
|
| 23 | /** |
|
| 24 | * @return Response |
|
| 25 | */ |
|
| 26 | public function layersDebug() |
|
| 27 | { |
|
| 28 | // The templates for showing exceptions are outside of the normal application |
|
| 29 | // template path. It is therefore necessary to specify the path here. |
|
| 30 | $this->get('php_template_engine')->addPath( |
|
| 31 | __DIR__ . '/../Resources/LayersDebug' |
|
| 32 | ); |
|
| 33 | ||
| 34 | // Render the template |
|
| 35 | $response = $this->get('php_template_engine')->render('List.html.php', array( |
|
| 36 | 'layerPriorityGroups' => $this->container->get('chain')->getLayers() |
|
| 37 | )); |
|
| 38 | ||
| 39 | return new Response($response); |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||