PHP Class Bolt\EventListener\SnippetListener

Inheritance: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Mostra file Open project: bolt/bolt

Protected Properties

Property Type Description
$canonical Bolt\Canonical
$config Bolt\Config
$packages Symfony\Component\Asset\Packages
$queue Bolt\Asset\Snippet\Queue
$render Bolt\Render

Public Methods

Method Description
__construct ( Queue $queue, Canonical $canonical, Symfony\Component\Asset\Packages $packages, Config $config, Render $render ) Constructor.
getSubscribedEvents ( )
onResponse ( FilterResponseEvent $event ) Callback for response event.

Protected Methods

Method Description
addSnippets ( ) Add base snippets to the response.
encode ( string $str ) : string Encode the snippet string and make it HTML safe.

Method Details

__construct() public method

Constructor.
public __construct ( Queue $queue, Canonical $canonical, Symfony\Component\Asset\Packages $packages, Config $config, Render $render )
$queue Bolt\Asset\Snippet\Queue
$canonical Bolt\Canonical
$packages Symfony\Component\Asset\Packages
$config Bolt\Config
$render Bolt\Render

addSnippets() protected method

Add base snippets to the response.
protected addSnippets ( )

encode() protected method

Encode the snippet string and make it HTML safe.
protected encode ( string $str ) : string
$str string
return string

getSubscribedEvents() public static method

public static getSubscribedEvents ( )

onResponse() public method

Callback for response event.
public onResponse ( FilterResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\FilterResponseEvent

Property Details

$canonical protected_oe property

protected Canonical,Bolt $canonical
return Bolt\Canonical

$config protected_oe property

protected Config,Bolt $config
return Bolt\Config

$packages protected_oe property

protected Packages,Symfony\Component\Asset $packages
return Symfony\Component\Asset\Packages

$queue protected_oe property

protected Queue,Bolt\Asset\Snippet $queue
return Bolt\Asset\Snippet\Queue

$render protected_oe property

protected Render,Bolt $render
return Bolt\Render