\WebinoDraw\ServiceDrawService

Class DrawService

Summary

Methods
Properties
Constants
__construct()
getOptions()
getInstructions()
setInstructions()
clearInstructions()
instructionsFromSet()
createDom()
createXmlDom()
drawDom()
draw()
drawXml()
No public properties found
SERVICE
No protected methods found
$eventIdentifier
$options
$instructionsRenderer
N/A
No private methods found
No private properties found
N/A

Constants

SERVICE

SERVICE

Application service name

Properties

$eventIdentifier

$eventIdentifier : string

Type

string

Methods

getInstructions()

getInstructions() : array

Returns

array

setInstructions()

setInstructions(array  $instructions) : self

Parameters

array $instructions

Returns

self

clearInstructions()

clearInstructions() : self

Returns

self

instructionsFromSet()

instructionsFromSet(string  $key) : array

Return instructions from set by a key

Parameters

string $key

Returns

array

createDom()

createDom(string  $xhtml, boolean  $isXml = false) : \WebinoDraw\Dom\Document

Create DOM document for drawing

Parameters

string $xhtml

XHTML valid string

boolean $isXml

Load as XML

Throws

\WebinoDraw\Exception\InvalidArgumentException

Returns

\WebinoDraw\Dom\Document

createXmlDom()

createXmlDom(string  $xml) : \WebinoDraw\Dom\Document

Parameters

string $xml

Returns

\WebinoDraw\Dom\Document

drawDom()

drawDom(\WebinoDraw\Dom\Element  $element, array|\WebinoDraw\Instructions\InstructionsInterface  $instructions, array  $vars) : self

Parameters

\WebinoDraw\Dom\Element $element

Element with owner document

array|\WebinoDraw\Instructions\InstructionsInterface $instructions

Options how to render

array $vars

Variables to substitute instructions parameters

Throws

\WebinoDraw\Exception\DrawException

Returns

self

draw()

draw(string  $xhtml, array|\WebinoDraw\Instructions\InstructionsInterface  $instructions, array  $vars, boolean  $isXml = false) : string

Render XHTML string

Parameters

string $xhtml

XHTML template

array|\WebinoDraw\Instructions\InstructionsInterface $instructions

Options how to render

array $vars

Data variables

boolean $isXml

Load as XML

Returns

string —

Rendered HTML

drawXml()

drawXml(string  $xhtml, array|\WebinoDraw\Instructions\InstructionsInterface  $instructions, array  $vars) : string

Render XML string

Parameters

string $xhtml

XHTML template

array|\WebinoDraw\Instructions\InstructionsInterface $instructions

Options how to render

array $vars

Data variables

Returns

string —

Rendered XML