PHP 클래스 Joli\GifExceptionBundle\EventListener\ReplaceImageListener

파일 보기 프로젝트 열기: jolicode/GifExceptionBundle

공개 메소드들

메소드 설명
__construct ( array $gifs, string $exceptionController, Symfony\Component\Asset\Packages $packages = null, Symfony\Component\Templating\Helper\CoreAssetsHelper $coreAssetsHelper = null )
onKernelResponse ( FilterResponseEvent $event ) Handle the response for exception and replace the little Phantom by a random Gif.

비공개 메소드들

메소드 설명
generateUrl ( string $url ) : string Generate an url in both Symfony 2 and Symfony 3 compatible ways.
getGifDir ( integer $statusCode ) : string Return the gif folder for the given status code.
getGifUrl ( string $dir, string $gif ) : string Return a the url of given gif in the given directory.
getRandomGif ( string $dir ) : string Return a random gif name for the given directory.

메소드 상세

__construct() 공개 메소드

public __construct ( array $gifs, string $exceptionController, Symfony\Component\Asset\Packages $packages = null, Symfony\Component\Templating\Helper\CoreAssetsHelper $coreAssetsHelper = null )
$gifs array
$exceptionController string
$packages Symfony\Component\Asset\Packages
$coreAssetsHelper Symfony\Component\Templating\Helper\CoreAssetsHelper

onKernelResponse() 공개 메소드

Handle the response for exception and replace the little Phantom by a random Gif.
public onKernelResponse ( FilterResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\FilterResponseEvent