\Phug\Formatter\FormatXmlFormat

Summary

Methods
Properties
Constants
__construct()
setFormatter()
getDebugComment()
format()
removeElementHandler()
setElementHandler()
removePhpTokenHandler()
setPhpTokenHandler()
handleCode()
escapeHtml()
formatCode()
formatAttributesList()
handleVariable()
getOptions()
setOptions()
setOptionsRecursive()
setOptionsDefaults()
hasOption()
getOption()
setOption()
unsetOption()
addOptionNameHandlers()
resetOptions()
hasPattern()
setPattern()
addPattern()
addPatterns()
setPatterns()
exportHelper()
requireHelper()
__invoke()
isWhiteSpaceSensitive()
No public properties found
CLASS_ATTRIBUTE
STRING_ATTRIBUTE
EXPRESSION_IN_TEXT
HTML_EXPRESSION_ESCAPE
HTML_TEXT_ESCAPE
PAIR_TAG
TRANSFORM_EXPRESSION
TRANSFORM_CODE
TRANSFORM_RAW_CODE
PHP_HANDLE_CODE
PHP_BLOCK_CODE
PHP_NESTED_HTML
PHP_DISPLAY_CODE
DISPLAY_COMMENT
DOCTYPE
CUSTOM_DOCTYPE
SAVE_VALUE
DEBUG_COMMENT
OPEN_PAIR_TAG
CLOSE_PAIR_TAG
SELF_CLOSING_TAG
ATTRIBUTE_PATTERN
BOOLEAN_ATTRIBUTE_PATTERN
BUFFER_VARIABLE
provideAttributeAssignments()
provideAttributeAssignment()
provideStandAloneAttributeAssignment()
provideMergeAttributes()
provideAttributesAssignment()
provideArrayEscape()
provideClassAttributeAssignment()
provideStyleAttributeAssignment()
provideStandAloneClassAttributeAssignment()
provideStandAloneStyleAttributeAssignment()
getDebugInfo()
getNewLine()
getIndent()
pattern()
handleTokens()
formatAssignmentValue()
formatDynamicValue()
formatPairAsArrayItem()
formatAttributeAsArrayItem()
arrayToPairsExports()
attributesAssignmentsFromPairs()
formatKeywordElement()
formatVariableElement()
formatCodeElement()
formatCommentElement()
formatAttributeValueAccordingToName()
formatExpressionElement()
formatTextElement()
formatDoctypeElement()
formatMixinAttributeValue()
getMixinAttributes()
formatMixinElement()
formatMixinCallElement()
getChildrenIterator()
formatElementChildren()
formatDocumentElement()
throwException()
patternName()
addAttributeAssignment()
isSelfClosingTag()
isBlockTag()
hasNonStaticAttributes()
formatAttributeElement()
formatPairTagChildren()
formatPairTag()
yieldAssignmentElement()
formatAssignmentElement()
hasDuplicateAttributeNames()
formatAttributes()
formatMarkupElement()
$formatter
N/A
isInKeywordParams()
isInFunctionParams()
isInInterpolation()
isInExclusionContext()
isInComplexInterpolation()
handleOptionName()
isTraversable()
filterTraversable()
setOptionArrays()
setDefaultOption()
withVariableReference()
withOptionReference()
$debugCommentPattern
$options
$optionNameHandlers
N/A

Constants

CLASS_ATTRIBUTE

CLASS_ATTRIBUTE

STRING_ATTRIBUTE

STRING_ATTRIBUTE

EXPRESSION_IN_TEXT

EXPRESSION_IN_TEXT

HTML_EXPRESSION_ESCAPE

HTML_EXPRESSION_ESCAPE

HTML_TEXT_ESCAPE

HTML_TEXT_ESCAPE

PAIR_TAG

PAIR_TAG

TRANSFORM_EXPRESSION

TRANSFORM_EXPRESSION

TRANSFORM_CODE

TRANSFORM_CODE

TRANSFORM_RAW_CODE

TRANSFORM_RAW_CODE

PHP_HANDLE_CODE

PHP_HANDLE_CODE

PHP_BLOCK_CODE

PHP_BLOCK_CODE

PHP_NESTED_HTML

PHP_NESTED_HTML

PHP_DISPLAY_CODE

PHP_DISPLAY_CODE

DISPLAY_COMMENT

DISPLAY_COMMENT

DOCTYPE

DOCTYPE

CUSTOM_DOCTYPE

CUSTOM_DOCTYPE

SAVE_VALUE

SAVE_VALUE

DEBUG_COMMENT

DEBUG_COMMENT

OPEN_PAIR_TAG

OPEN_PAIR_TAG

CLOSE_PAIR_TAG

CLOSE_PAIR_TAG

SELF_CLOSING_TAG

SELF_CLOSING_TAG

ATTRIBUTE_PATTERN

ATTRIBUTE_PATTERN

BOOLEAN_ATTRIBUTE_PATTERN

BOOLEAN_ATTRIBUTE_PATTERN

BUFFER_VARIABLE

BUFFER_VARIABLE

Properties

$debugCommentPattern

$debugCommentPattern : string

Type

string

$options

$options : \ArrayObject

Type

\ArrayObject

$optionNameHandlers

$optionNameHandlers : array

Type

array

Methods

__construct()

__construct(\Phug\Formatter  $formatter = null) 

Parameters

\Phug\Formatter $formatter

setFormatter()

setFormatter(\Phug\Formatter  $formatter) : $this

Parameters

\Phug\Formatter $formatter

Returns

$this

getDebugComment()

getDebugComment(  $nodeId) 

Parameters

$nodeId

format()

format(  $element, boolean  $noDebug = false) : string

Parameters

$element
boolean $noDebug

Returns

string

removeElementHandler()

removeElementHandler(  $className) : $this

Parameters

$className

Returns

$this

setElementHandler()

setElementHandler(  $className, callable  $handler) : $this

Parameters

$className
callable $handler

Returns

$this

removePhpTokenHandler()

removePhpTokenHandler(  $phpTokenId) : $this

Parameters

$phpTokenId

Returns

$this

setPhpTokenHandler()

setPhpTokenHandler(  $phpTokenId,   $handler) : $this

Parameters

$phpTokenId
$handler

Returns

$this

handleCode()

handleCode(string  $phpCode) : string

Handle PHP code with the pattern php_handle_code.

Parameters

string $phpCode

Returns

string

escapeHtml()

escapeHtml(string  $expression) : string

Apply html_expression_escape pattern.

Parameters

string $expression

Returns

string

formatCode()

formatCode(string  $code, boolean  $checked, boolean  $noTransformation = false) : string

Format a code with transform_expression and tokens handlers.

Parameters

string $code
boolean $checked
boolean $noTransformation

Returns

string

handleVariable()

handleVariable(  $variable,   $index,   $tokens,   $checked) 

Parameters

$variable
$index
$tokens
$checked

getOptions()

getOptions() 

{@inheritdoc}

setOptions()

setOptions(  $options) 

{@inheritdoc}

Parameters

$options

setOptionsRecursive()

setOptionsRecursive(  $options) 

{@inheritdoc}

Parameters

$options

setOptionsDefaults()

setOptionsDefaults(  $options = null) 

{@inheritdoc}

Parameters

$options

hasOption()

hasOption(  $name) 

{@inheritdoc}

Parameters

$name

getOption()

getOption(  $name) 

{@inheritdoc}

Parameters

$name

setOption()

setOption(  $name,   $value) 

{@inheritdoc}

Parameters

$name
$value

unsetOption()

unsetOption(  $name) 

{@inheritdoc}

Parameters

$name

addOptionNameHandlers()

addOptionNameHandlers(callable  $handler) 

Parameters

callable $handler

resetOptions()

resetOptions() 

hasPattern()

hasPattern(  $name) : boolean

Parameters

$name

Returns

boolean

addPatterns()

addPatterns(  $patterns) : $this

Parameters

$patterns

Returns

$this

setPatterns()

setPatterns(  $patterns) : $this

Parameters

$patterns

Returns

$this

exportHelper()

exportHelper(array  $name, array  $arguments = null) : string

Parameters

array $name
array $arguments

Returns

string

requireHelper()

requireHelper(  $name) 

Parameters

$name

provideAttributeAssignments()

provideAttributeAssignments() : $this

Returns

$this

provideAttributeAssignment()

provideAttributeAssignment() : $this

Returns

$this

provideStandAloneAttributeAssignment()

provideStandAloneAttributeAssignment() : $this

Returns

$this

provideMergeAttributes()

provideMergeAttributes() : $this

Returns

$this

provideAttributesAssignment()

provideAttributesAssignment() : $this

Returns

$this

provideArrayEscape()

provideArrayEscape() : $this

Returns

$this

provideClassAttributeAssignment()

provideClassAttributeAssignment() : $this

Returns

$this

provideStyleAttributeAssignment()

provideStyleAttributeAssignment() : $this

Returns

$this

provideStandAloneClassAttributeAssignment()

provideStandAloneClassAttributeAssignment() : $this

Returns

$this

provideStandAloneStyleAttributeAssignment()

provideStandAloneStyleAttributeAssignment() : $this

Returns

$this

getDebugInfo()

getDebugInfo(  $element) 

Parameters

$element

getNewLine()

getNewLine() 

getIndent()

getIndent() 

pattern()

pattern(  $patternOption) 

Parameters

$patternOption

handleTokens()

handleTokens(  $code,   $checked) 

Parameters

$code
$checked

formatAssignmentValue()

formatAssignmentValue(  $value) 

Parameters

$value

formatDynamicValue()

formatDynamicValue(  $formattedName,   $value) 

Parameters

$formattedName
$value

formatPairAsArrayItem()

formatPairAsArrayItem(  $name,   $value) 

Parameters

$name
$value

arrayToPairsExports()

arrayToPairsExports(  $array) 

Parameters

$array

attributesAssignmentsFromPairs()

attributesAssignmentsFromPairs(  $pairs,   $helper = 'attributes_assignment') 

Parameters

$pairs
$helper

formatAttributeValueAccordingToName()

formatAttributeValueAccordingToName(  $value,   $name,   $checked) 

Parameters

$value
$name
$checked

formatMixinAttributeValue()

formatMixinAttributeValue(  $value) 

Parameters

$value

getMixinAttributes()

getMixinAttributes(\SplObjectStorage  $source) 

Parameters

\SplObjectStorage $source

formatElementChildren()

formatElementChildren(\Phug\Formatter\ElementInterface  $element,   $indentStep = 1) 

Parameters

\Phug\Formatter\ElementInterface $element
$indentStep

patternName()

patternName(  $name) 

Parameters

$name

addAttributeAssignment()

addAttributeAssignment(  $name,   $handler) 

Parameters

$name
$handler

isSelfClosingTag()

isSelfClosingTag(\Phug\Formatter\MarkupInterface  $element,   $isSelfClosing = null) 

Parameters

\Phug\Formatter\MarkupInterface $element
$isSelfClosing

yieldAssignmentElement()

yieldAssignmentElement(\Phug\Formatter\Element\AssignmentElement  $element) : \Generator

Parameters

\Phug\Formatter\Element\AssignmentElement $element

Throws

\Phug\FormatterException

Returns

\Generator

formatAssignmentElement()

formatAssignmentElement(\Phug\Formatter\Element\AssignmentElement  $element) : string

Parameters

\Phug\Formatter\Element\AssignmentElement $element

Throws

\Phug\FormatterException

Returns

string

isInKeywordParams()

isInKeywordParams(  $tokens,   $index) 

Parameters

$tokens
$index

isInFunctionParams()

isInFunctionParams(  $tokens,   $index) 

Parameters

$tokens
$index

isInInterpolation()

isInInterpolation(  $tokens,   $index) 

Parameters

$tokens
$index

isInExclusionContext()

isInExclusionContext(  $tokens,   $index) 

Parameters

$tokens
$index

isInComplexInterpolation()

isInComplexInterpolation(  $tokens,   $index) 

Parameters

$tokens
$index

handleOptionName()

handleOptionName(string  $name) : string

Parameters

string $name

Returns

string

isTraversable()

isTraversable(  $value) 

Parameters

$value

filterTraversable()

filterTraversable(  $values) 

Parameters

$values

setOptionArrays()

setOptionArrays(array  $arrays, string  $functionName) : $this

Parameters

array $arrays
string $functionName

Returns

$this

setDefaultOption()

setDefaultOption(  $key,   $value) 

Parameters

$key
$value

withVariableReference()

withVariableReference(mixed  $variable,   $name, callable  $callback) : \Phug\Util\Partial\&$options

Parameters

mixed $variable
$name
callable $callback

Returns

\Phug\Util\Partial\&$options

withOptionReference()

withOptionReference(  $name, callable  $callback) : \Phug\Util\Partial\&$options

Parameters

$name
callable $callback

Returns

\Phug\Util\Partial\&$options