Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed0eb8225b | ||
|
|
0e655fd387 | ||
|
|
ce43abb954 | ||
|
|
5aa70dfd17 |
No files matched your search
@@ -33,6 +33,8 @@ class SectionToken implements ControlStructure {
|
|||||||
throw new \RuntimeException("A section closing tag {% endsection %} was found without an opening {% section %} tag");
|
throw new \RuntimeException("A section closing tag {% endsection %} was found without an opening {% section %} tag");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->action = PrintActionEnum::default;
|
||||||
|
|
||||||
return $this->printEndSection($context);
|
return $this->printEndSection($context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ class NumberExtension implements Extension, FunctionExtension {
|
|||||||
public string $title = "",
|
public string $title = "",
|
||||||
) {
|
) {
|
||||||
$this->locale = explode('.', \Locale::getDefault())[0];
|
$this->locale = explode('.', \Locale::getDefault())[0];
|
||||||
|
$this->formatter = new \NumberFormatter($this->locale, \NumberFormatter::CURRENCY);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function exportFunctions(): array
|
public function exportFunctions(): array
|
||||||
@@ -55,8 +56,6 @@ class NumberExtension implements Extension, FunctionExtension {
|
|||||||
|
|
||||||
public function money(float $money, ? string $currency = null) /* : string|false */
|
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->setTextAttribute(\NumberFormatter::CURRENCY_CODE, 'CAD');
|
||||||
|
|
||||||
$this->formatter->setPattern( str_replace('¤#','¤ #', $this->formatter->getPattern() ) );
|
$this->formatter->setPattern( str_replace('¤#','¤ #', $this->formatter->getPattern() ) );
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ class PrintExtension implements Extension {
|
|||||||
|
|
||||||
public array $token = [ "echo", "print", "printf", "no_html" ];
|
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;
|
public string $encoding;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user