Baum\Generators\Generator::parseStub PHP Method

parseStub() protected method

Parse the provided stub and replace via the array given.
protected parseStub ( string $stub, string $replacements = [] ) : string
$stub string
$replacements string
return string
    protected function parseStub($stub, $replacements = [])
    {
        $output = $stub;
        foreach ($replacements as $key => $replacement) {
            $search = '{{' . $key . '}}';
            $output = str_replace($search, $replacement, $output);
        }
        return $output;
    }