\Phug\FormatterAbstractFormat

Summary

Methods
Properties
Constants
handleVariable()
getOptions()
setOptions()
setOptionsRecursive()
setOptionsDefaults()
hasOption()
getOption()
setOption()
unsetOption()
addOptionNameHandlers()
resetOptions()
hasPattern()
setPattern()
addPattern()
addPatterns()
setPatterns()
exportHelper()
__construct()
setFormatter()
getDebugComment()
format()
removeElementHandler()
setElementHandler()
removePhpTokenHandler()
setPhpTokenHandler()
handleCode()
escapeHtml()
formatCode()
formatAttributesList()
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
patternName()
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()
$formatter
N/A
isInKeywordParams()
isInFunctionParams()
isInInterpolation()
isInExclusionContext()
isInComplexInterpolation()
handleOptionName()
isTraversable()
filterTraversable()
setOptionArrays()
setDefaultOption()
withVariableReference()
withOptionReference()
$options
$optionNameHandlers
$debugCommentPattern
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

Properties

$options

$options : \ArrayObject

Type

\ArrayObject

$optionNameHandlers

$optionNameHandlers : array

Type

array

$debugCommentPattern

$debugCommentPattern : string

Type

string

Methods

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

__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

patternName()

patternName(  $name) 

Parameters

$name

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

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