<?php
 class vB_Utility_Template_ParserNode_Curly_Hook extends vB_Utility_Template_ParserNode_Curly { public function validate() : array { $errors = []; $attributecount = sizeof($this->main_node->attributes); if ($attributecount == 0) { $errors[] = 'no_hook_specified'; } if ($attributecount < 1) { $errors[] = 'too_few_attributes'; } return $errors; } public function compile() : string { $argument = $this->attributeToString($this->main_node->attributes[0]); return 'vB_Template_Runtime::hook(' . $argument .', get_defined_vars())'; } } 