<?php
 class vB_Utility_Template_ParserNode_Curly_Phrase extends vB_Utility_Template_ParserNode_Curly { public function validate() : array { $errors = []; $attributecount = sizeof($this->main_node->attributes); if ($attributecount == 0) { $errors[] = 'no_phrase_specified'; } return $errors; } public function compile() : string { $phrasename = $this->attributeToString($this->main_node->attributes[0]); $arguments = array_map(function($val) {return "htmlspecialchars($val)";}, $this->getRenderedAttributes(1)); $arguments = ($arguments ? ', ' . implode(', ', $arguments) : ''); return 'vB_Template_Runtime::parsePhrase(' . $phrasename . $arguments . ')'; } } 