PHP Class DOMPDFModule\View\Strategy\PdfStrategy

Inheritance: implements Zend\EventManager\ListenerAggregateInterface
Show file Open project: raykolbe/DOMPDFModule Class Usage Examples

Protected Properties

Property Type Description
$listeners Zend\Stdlib\CallbackHandler[]
$renderer DOMPDFModule\View\Renderer\PdfRenderer

Public Methods

Method Description
__construct ( PdfRenderer $renderer ) : void Constructor
attach ( Zend\EventManager\EventManagerInterface $events, integer $priority = 1 ) : void Attach the aggregate to the specified event manager
detach ( Zend\EventManager\EventManagerInterface $events ) : void Detach aggregate listeners from the specified event manager
injectResponse ( Zend\View\ViewEvent $event ) : void Inject the response with the PDF payload and appropriate Content-Type header
selectRenderer ( Zend\View\ViewEvent $event ) : null | PdfRenderer Detect if we should use the PdfRenderer based on model type

Method Details

__construct() public method

Constructor
public __construct ( PdfRenderer $renderer ) : void
$renderer DOMPDFModule\View\Renderer\PdfRenderer
return void

attach() public method

Attach the aggregate to the specified event manager
public attach ( Zend\EventManager\EventManagerInterface $events, integer $priority = 1 ) : void
$events Zend\EventManager\EventManagerInterface
$priority integer
return void

detach() public method

Detach aggregate listeners from the specified event manager
public detach ( Zend\EventManager\EventManagerInterface $events ) : void
$events Zend\EventManager\EventManagerInterface
return void

injectResponse() public method

Inject the response with the PDF payload and appropriate Content-Type header
public injectResponse ( Zend\View\ViewEvent $event ) : void
$event Zend\View\ViewEvent
return void

selectRenderer() public method

Detect if we should use the PdfRenderer based on model type
public selectRenderer ( Zend\View\ViewEvent $event ) : null | PdfRenderer
$event Zend\View\ViewEvent
return null | DOMPDFModule\View\Renderer\PdfRenderer

Property Details

$listeners protected property

protected CallbackHandler[],Zend\Stdlib $listeners
return Zend\Stdlib\CallbackHandler[]

$renderer protected property

protected PdfRenderer,DOMPDFModule\View\Renderer $renderer
return DOMPDFModule\View\Renderer\PdfRenderer