Silvia Dellai

Nationality:
Age:
33
Also known as:
Dellai Twins, Sylvia Dellai
Tags:Anal, Piss, Brunette, Double penetration (DP), 3+ on 1, Ass to mouth, Facial cumshot, Sex toy, Deep throat, Rough, Czech, Piss drinking, Cum swallowing, Blowjob, Gapes (gaping asshole), Double anal (DAP), Lingerie, Anal creampies, Transsexual, Ass licking, Blonde, Huge toy, Bbc, Interracial, Gape farts, Fake tits, Shaved pussy hair, Long hair, Tongue piercing, Tattoo, Textual tattoo, Airtight, Miniskirt, Pantyhose, Bra, High heels, Average height, Collar, Panties, Tanned ...

TAGS

AnalPissBrunetteDouble penetration (DP)3+ on 1Ass to mouthFacial cumshotSex toyDeep throat
RoughCzechPiss drinkingCum swallowingBlowjobGapes (gaping asshole)Double anal (DAP)LingerieAnal creampiesTranssexualAss lickingBlondeHuge toyBbcInterracialGape fartsFake titsShaved pussy hairLong hairTongue piercingTattooTextual tattooAirtightMiniskirtPantyhoseBraHigh heelsAverage heightCollarPantiesTannedIndoorDouble bjBlowbangPiss in assEager piss-drinkerOnly analBalls deep analHard and fast fucking0% pussyProlapseSkinny1 on 1BarefootJewelryThongFoot fetishBeautyAnal creampie swallowBig ass gapeOnly black men on white girlsGangbangAverage assAverage size titsPiledriverFishnetBlack and whiteCowgirlMouthfulMouthful of pissItalianRough sexWet pussyJuicy pussyPink pussySexySexy clothesBig cockSpoon positionMissionaryAirplane positionDouble blowjobCurvyShortsStockingsHuge anal gapeHot bodCrazy curvesDestroyed assholeCum eaterMuscle toneRidingSensual sexEnthusiastic sexPassionate sexPretty pussySmall pussyPussy pumpLong cockFat dickSlappingMultiple cumshotsFace fuckingHandjobAss shakingStrip teaseTriple anal (TAP)Anal queenPiss in mouthPretty faceDoggystylePornstarMan pissing on girlGaggingAss clapAss playIntense analPiss on bodyDouble vaginal (DPP)Ass to pussy (ATP)Perfect titsPerfect assCircular anal gapeAverage anal gapeBalls deep vaginalFartsPiss on titsPerfect shape titsFarting anal creampieAnal masturbationFit bodyYoung womanFistingAverage proportionsSmall assDestroyed gapeAss fistingMan rimming girlAnal fingeringRound assDrinking piss from a glassSpankingOrgyStanding DPPiss wash endingWet blowjobCum in mouthAnal slutRoleplayBall lickingMultiple orgasmsReal orgasmCock playPiss loverBehind the scenes (BTS)Anal orgasmSpit on cockWhite girlPussy fuckingBabeSolo masturbationBlack guy2 on 1Big dildoReverse cowgirlPiss drinking queenNewbieRimmingGirl rimming manAmateurCumloadNatural titsTotal slutGermanySlutWild sexBlack cock loverSquirting from ass fuckingFetishMilk
...

SCENES

foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>
foreach (array_filter(func_get_args(), 'is_array') as $input) { foreach ($input as $name => $value) { $attributeAssignment($attributes, $name, $value); } } return $attributes; }, 'Phug\\Formatter\\Format\\HtmlFormat::array_escape' => function ($name, $input) use (&$pugModule) { $arrayEscape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::array_escape']; $escape = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.html_text_escape']; if (is_array($input) && in_array(strtolower($name), ['class', 'style'], true)) { $result = []; foreach ($input as $key => $value) { $result[$escape($key)] = $arrayEscape($name, $value); } return $result; } if (is_array($input) || is_object($input) && !method_exists($input, '__toString')) { return $escape(json_encode($input)); } if (is_string($input)) { return $escape($input); } return $input; }, 'Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping' => array ( ), 'Phug\\Formatter\\Format\\HtmlFormat::attributes_assignment' => function () use (&$pugModule) { $attrMapping = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::attributes_mapping']; $mergeAttr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::merge_attributes']; $pattern = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern']; $attr = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.attribute_pattern']; $bool = $pugModule['Phug\\Formatter\\Format\\HtmlFormat::pattern.boolean_attribute_pattern']; $attributes = call_user_func_array($mergeAttr, func_get_args()); $code = ''; foreach ($attributes as $originalName => $value) { if ($value !== null && $value !== false && ($value !== '' || $originalName !== 'class')) { $name = isset($attrMapping[$originalName]) ? $attrMapping[$originalName] : $originalName; if ($value === true) { $code .= $pattern($bool, $name, $name); continue; } if (is_array($value) || is_object($value) && !method_exists($value, '__toString')) { $value = json_encode($value); } $code .= $pattern($attr, $name, $value); } } return $code; }, 'Phug\\Formatter\\Format\\HtmlFormat::class_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { $split = function ($input) { return preg_split('/(?\=\%])/', strval($input)); }; $classes = isset($attributes['class']) ? array_filter($split($attributes['class'])) : []; foreach ((array) $value as $key => $input) { if (!is_string($input) && is_string($key)) { if (!$input) { continue; } $input = $key; } foreach ($split($input) as $class) { if (!in_array($class, $classes, true)) { $classes[] = $class; } } } return implode(' ', $classes); }, 'Phug\\Formatter\\Format\\HtmlFormat::style_attribute_assignment' => function (&$attributes, $value) use (&$pugModule) { if (is_string($value) && mb_substr($value, 0, 7) === '{"') { $value = json_decode(htmlspecialchars_decode($value)); } $styles = isset($attributes['style']) ? array_filter(explode(';', $attributes['style'])) : []; foreach ((array) $value as $propertyName => $propertyValue) { if (!is_int($propertyName)) { $propertyValue = $propertyName.':'.$propertyValue; } $styles[] = $propertyValue; } return implode(';', $styles); }, ]; ?>