merged branch lencioni/improve-exception-controller-documentation (PR #3669)
Commits -------1422133
[TwigBundle] Made docblock for findTemplate() more general and accurate5910ac9
[TwigBundle] Added a use statement to shorten class name in a docblock3e7eebd
[TwigBundle] Improved ExceptionController docblocks Discussion ---------- [TwigBundle] Improved ExceptionController docblocks Bug fix: no Feature addition: no Backwards compatibility break: no Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/lencioni/symfony.png)](http://travis-ci.org/lencioni/symfony) Fixes the following tickets: - Todo: - --------------------------------------------------------------------------- by lencioni at 2012-03-21T20:47:16Z I obviously don't know what I'm doing here. :/ --------------------------------------------------------------------------- by vicb at 2012-03-21T20:47:39Z no pb just rebase on master and force push
This commit is contained in:
commit
e28223773c
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\TwigBundle\Controller;
|
namespace Symfony\Bundle\TwigBundle\Controller;
|
||||||
|
|
||||||
|
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
|
||||||
use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference;
|
use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAware;
|
use Symfony\Component\DependencyInjection\ContainerAware;
|
||||||
use Symfony\Component\HttpKernel\Exception\FlattenException;
|
use Symfony\Component\HttpKernel\Exception\FlattenException;
|
||||||
@ -31,6 +32,8 @@ class ExceptionController extends ContainerAware
|
|||||||
* @param DebugLoggerInterface $logger A DebugLoggerInterface instance
|
* @param DebugLoggerInterface $logger A DebugLoggerInterface instance
|
||||||
* @param string $format The format to use for rendering (html, xml, ...)
|
* @param string $format The format to use for rendering (html, xml, ...)
|
||||||
*
|
*
|
||||||
|
* @return Response
|
||||||
|
*
|
||||||
* @throws \InvalidArgumentException When the exception template does not exist
|
* @throws \InvalidArgumentException When the exception template does not exist
|
||||||
*/
|
*/
|
||||||
public function showAction(FlattenException $exception, DebugLoggerInterface $logger = null, $format = 'html')
|
public function showAction(FlattenException $exception, DebugLoggerInterface $logger = null, $format = 'html')
|
||||||
@ -59,6 +62,9 @@ class ExceptionController extends ContainerAware
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
protected function getAndCleanOutputBuffering()
|
protected function getAndCleanOutputBuffering()
|
||||||
{
|
{
|
||||||
// ob_get_level() never returns 0 on some Windows configurations, so if
|
// ob_get_level() never returns 0 on some Windows configurations, so if
|
||||||
@ -76,6 +82,14 @@ class ExceptionController extends ContainerAware
|
|||||||
return $currentContent;
|
return $currentContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param EngineInterface $templating
|
||||||
|
* @param string $format
|
||||||
|
* @param integer $code An HTTP response status code
|
||||||
|
* @param Boolean $debug
|
||||||
|
*
|
||||||
|
* @return TemplateReference
|
||||||
|
*/
|
||||||
protected function findTemplate($templating, $format, $code, $debug)
|
protected function findTemplate($templating, $format, $code, $debug)
|
||||||
{
|
{
|
||||||
$name = $debug ? 'exception' : 'error';
|
$name = $debug ? 'exception' : 'error';
|
||||||
|
Reference in New Issue
Block a user