PHP 클래스 Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener

저자: Fabien Potencier ([email protected])
파일 보기 프로젝트 열기: pmjones/php-framework-benchmarks 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$container Symfony\Component\DependencyInjection\ContainerInterface

공개 메소드들

메소드 설명
__construct ( Symfony\Component\DependencyInjection\ContainerInterface $container ) Constructor.
onKernelController ( FilterControllerEvent $event ) Guesses the template name to render and its variables and adds them to the request object.
onKernelView ( GetResponseForControllerResultEvent $event ) Renders the template and initializes a new response object with the rendered template content.

보호된 메소드들

메소드 설명
getBundleForClass ( string $class ) Returns the Bundle instance in which the given class name is located.
guessTemplateName ( array $controller, Request $request ) : TemplateReference Guesses and returns the template name to render based on the controller and action names.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( Symfony\Component\DependencyInjection\ContainerInterface $container )
$container Symfony\Component\DependencyInjection\ContainerInterface The service container instance

getBundleForClass() 보호된 메소드

Returns the Bundle instance in which the given class name is located.
protected getBundleForClass ( string $class )
$class string A fully qualified controller class name

guessTemplateName() 보호된 메소드

Guesses and returns the template name to render based on the controller and action names.
protected guessTemplateName ( array $controller, Request $request ) : TemplateReference
$controller array An array storing the controller object and action method
$request Symfony\Component\HttpFoundation\Request A Request instance
리턴 Symfony\Bundle\FrameworkBundle\Templating\TemplateReference template reference

onKernelController() 공개 메소드

Guesses the template name to render and its variables and adds them to the request object.
public onKernelController ( FilterControllerEvent $event )
$event Symfony\Component\HttpKernel\Event\FilterControllerEvent A FilterControllerEvent instance

onKernelView() 공개 메소드

Renders the template and initializes a new response object with the rendered template content.
public onKernelView ( GetResponseForControllerResultEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent A GetResponseForControllerResultEvent instance

프로퍼티 상세

$container 보호되어 있는 프로퍼티

protected ContainerInterface,Symfony\Component\DependencyInjection $container
리턴 Symfony\Component\DependencyInjection\ContainerInterface