dhii / placeholder-template-abstract
Abstract functionality for working with templates that use placeholders.
Installs: 1 369
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^5.4 | ^7.0
Requires (Dev)
- codeclimate/php-test-reporter: <=0.3.2
- dhii/php-cs-fixer-config: ^0.1
- dhii/stringable-interface: ^0.1
- phpunit/phpunit: ^4.8
- psr/container: ^1.0
- ptrofimov/xpmock: ^1.1
Suggests
- dhii/container-helper-base: For standardized container retrieval
- dhii/exception: For exceptions and exception factories
- dhii/i18n-helper-base: For internationalization functionality
- dhii/normalization-helper-base: For normalization of strings and other simple types
- dhii/regex-abstract: For RegEx functionality, such as quoting and matching
- dhii/stringable-helper-base: For string replacement functionality
This package is auto-updated.
Last update: 2024-12-07 04:43:15 UTC
README
Details
Abstract functionality for working with templates that use placeholders.
Traits
ReplaceTokensCapableTrait
- Replaces tokens in a string with their corresponding values from a container, according to the token start and end. Allows normalization of token key into format used in container.NormalizeTokenDelimiterCapableTrait
- Normalizes token delimiters, like token start and end, making sure value type is correct.TokenStartAwareTrait
- Awareness of a token start delimiter.TokenEndAwareTrait
- Awareness of a token end delimiter.DefaultPlaceholderValueAwareTrait
- Awareness of a default placeholder value.PlaceholderTemplateAwareCapableTrait
- Awareness of a placeholder template source.