src/String/Template.php
public function apply(array $params)
    {
        $tags = [];
        foreach ($params as $key => $value) {
            $tags['/{' . $key . '}/'] = $value;
        }
        return preg_replace(array_keys($tags), array_values($tags), $this->getConfig('template'));
    }
public function apply(array $params)
    {
        $tags = [];
        foreach ($params as $key => $value) {
            $tags['/{' . $key . '}/'] = $value;
        }
        return preg_replace(array_keys($tags), array_values($tags), $this->getConfig('template'));
    }
public function apply ( array $ params ) { $ tags = [ ] ; foreach ( $ params as $ key => $ value ) { $ tags [ '/{' . $ key . '}/' ] = $ value ; } return preg_replace ( array_keys ( $ tags ) , array_values ( $ tags ) , $ this -> getConfig ( 'template' ) ) ; }
Apply a data set to the template.

@param array $params The data set.

@return string The filled-out template.
Apply a data set to the template .