new-inventor / template
Template class for string replacements
Installs: 34
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/new-inventor/template
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-10-12 00:31:04 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();