4 Commits
3 changed files with 4 additions and 3 deletions

No files matched your search

+2
View File
@@ -33,6 +33,8 @@ class SectionToken implements ControlStructure {
throw new \RuntimeException("A section closing tag {% endsection %} was found without an opening {% section %} tag");
}
$this->action = PrintActionEnum::default;
return $this->printEndSection($context);
}
}
+1 -2
View File
@@ -15,6 +15,7 @@ class NumberExtension implements Extension, FunctionExtension {
public string $title = "",
) {
$this->locale = explode('.', \Locale::getDefault())[0];
$this->formatter = new \NumberFormatter($this->locale, \NumberFormatter::CURRENCY);
}
public function exportFunctions(): array
@@ -55,8 +56,6 @@ class NumberExtension implements Extension, FunctionExtension {
public function money(float $money, ? string $currency = null) /* : string|false */
{
$this->formatter ??= new \NumberFormatter($this->locale, \NumberFormatter::CURRENCY);
$this->formatter->setTextAttribute(\NumberFormatter::CURRENCY_CODE, 'CAD');
$this->formatter->setPattern( str_replace('¤#','¤ #', $this->formatter->getPattern() ) );
+1 -1
View File
@@ -8,7 +8,7 @@ class PrintExtension implements Extension {
public array $token = [ "echo", "print", "printf", "no_html" ];
public int $flag = \ENT_QUOTES;
public int $flag = \ENT_QUOTES | \ENT_DISALLOWED | \ENT_SUBSTITUTE;
public string $encoding;