-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for conditional statements #12
Comments
This would be great. Have you found a solution? |
Hoa\Ruler could help you in this circumstance :) |
@bnlab @Donnie Conditional can be rendered using PHPAlternatively conditional can be rendered using JMESPATH |
Hi, old issue here, me too, I needed support for conditionnal and I added it : here is my pull request for this feature ( as well as some other improvements ) : #22 You can use a simple condition: $engine = new StringTemplate\Engine();
You can use a simple condition with else:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have been looking for a script which would also process conditional statements in string.
for e.g:
$string = 'My name is {name} and I scored {if: score>10 then well else poorly}.
The text was updated successfully, but these errors were encountered: