FOF30\View\Compiler\Blade::compileRepeatable PHP Method

compileRepeatable() protected method

Compile the end repeatable statements into valid PHP.
protected compileRepeatable ( string $expression ) : string
$expression string
return string
    protected function compileRepeatable($expression)
    {
        $expression = trim($expression, '()');
        $parts = explode(',', $expression, 2);
        $functionName = '_fof_blade_repeatable_' . md5($this->path . trim($parts[0]));
        $argumentsList = isset($parts[1]) ? $parts[1] : '';
        return "<?php @\${$functionName} = function({$argumentsList}) { ?>";
    }