new-inventor / template
Template class for string replacements
1.0.0
2016-04-07 08:11 UTC
Requires
- php: >=5.4.0
- new-inventor/config-tool: *
- new-inventor/php-type-checker: *
Requires (Dev)
- phpunit/phpunit: 5.1.*
This package is not auto-updated.
Last update: 2025-01-18 20:41:13 UTC
README
#Template
Класс для замены заглушек мекстом.
Границы заглушек определяются в настройках $config['template']['borders']
.
пример конфига можно посмотреть в файле src/config/default.
Использование
$template = new Template($someString)
$placeholders = $template->getPlaceholders();
foreach($placeholders as $placeholder){
do something ..
$template->addReplacement($resString);
}
return $template->getReplaced();