picea/src/ControlStructure/ViewToken.php
Dave Mc Nicoll bb29a56077 - Added while/endwhile and do/while syntaxes
- Fix the abstractclass requirement of parse() function
2022-12-19 19:36:39 +00:00

14 lines
497 B
PHP

<?php
namespace Picea\ControlStructure;
class ViewToken implements ControlStructure {
public string $token = "view";
public function parse(\Picea\Compiler\Context &$context, ?string $arguments, string $token) {
# The way this is ordered, if you provide a second arguments, being an array of variables, get_defined_vars() will not be pushed inside the view
return "<?php echo \$___class__template->picea->inlineHtml(\$this, $arguments, get_defined_vars()); ?>";
}
}