Files
picea/src/ControlStructure/ForeachToken.php
T

22 lines
610 B
PHP

<?php
namespace Picea\ControlStructure;
use DI\Definition\Source\AnnotationBasedAutowiring;
class ForeachToken extends AbstractLoop {
public array $token = [ "foreach", "endforeach", "/foreach" ];
public function parse(\Picea\Compiler\Context &$context, ?string $arguments, string $token, array $options = []) : string
{
switch($token) {
case "foreach":
return $this->openLoop($context, $arguments, $token);
case "endforeach":
case "/foreach":
return $this->closeLoop($context, $arguments, $token);
}
}
}