PHP Class Elcodi\Store\CoreBundle\Controller\ExceptionController

Inheritance: extends Symfony\Bundle\TwigBundle\Controller\ExceptionController
Show file Open project: elcodi/bamboo

Protected Properties

Property Type Description
$defaultTemplate string Template by default
$fallbackCode integer | null Status code for non http-exceptions, or null for no fallback
$templateByCode string[] Template path by status code for rendering
$templateLocator Elcodi\Store\CoreBundle\Services\TemplateLocator Template locator

Public Methods

Method Description
__construct ( Twig_Environment $twig, boolean $debug, TemplateLocator $templateLocator, string $defaultTemplate, array $templateByCode, integer | null $fallbackCode = null ) Constructor

Protected Methods

Method Description
findTemplate ( Request $request, string $format, integer $code, boolean $showException ) : Symfony\Component\Templating\TemplateReferenceInterface Return the template for rendering a status code
supports ( Request $request ) : boolean Checks if we can process the current event

Method Details

__construct() public method

Constructor
public __construct ( Twig_Environment $twig, boolean $debug, TemplateLocator $templateLocator, string $defaultTemplate, array $templateByCode, integer | null $fallbackCode = null )
$twig Twig_Environment Template engine
$debug boolean Show error (false) or exception (true) pages by default
$templateLocator Elcodi\Store\CoreBundle\Services\TemplateLocator Where to search for templates
$defaultTemplate string Default template
$templateByCode array Template by status code
$fallbackCode integer | null Status code for fallback exceptions

findTemplate() protected method

Return the template for rendering a status code
protected findTemplate ( Request $request, string $format, integer $code, boolean $showException ) : Symfony\Component\Templating\TemplateReferenceInterface
$request Symfony\Component\HttpFoundation\Request
$format string
$code integer Status code to locate a template
$showException boolean
return Symfony\Component\Templating\TemplateReferenceInterface

supports() protected method

Checks if we can process the current event
protected supports ( Request $request ) : boolean
$request Symfony\Component\HttpFoundation\Request
return boolean

Property Details

$defaultTemplate protected property

Template by default
protected string $defaultTemplate
return string

$fallbackCode protected property

Status code for non http-exceptions, or null for no fallback
protected int|null $fallbackCode
return integer | null

$templateByCode protected property

Template path by status code for rendering
protected string[] $templateByCode
return string[]

$templateLocator protected property

Template locator
protected TemplateLocator,Elcodi\Store\CoreBundle\Services $templateLocator
return Elcodi\Store\CoreBundle\Services\TemplateLocator