-
Notifications
You must be signed in to change notification settings - Fork 13
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
a way to display a structured variable #59
Comments
This is easily possible; for example, However, I did't want to include such a function in the core ginger library, for three reasons: first, because the exact formatting you want will differ between applications, and whatever default we offer is likely going to be not quite what you want; second, because it would increase code size, dependency footprint, etc., for questionable gains; and third, because the structure of GVal is such that it's not always obvious what the dump should look like. In PHP, a value can be a sorted-hashmap-from-hell ("array" in PHP terminology), a byte array (confusingly called "string" in PHP), a number, etc., but never more than one of them - but a GVal may or may not offer conversions to any number of these, and it's not automatically clear which one you want. In other words, if |
Maybe there can be a For my use case though |
When i have a nest structure of arrays and objects and do
{{var}}
it concatenates all values. Instead could it print a JSON like format to see the structure? If this is not desirable with the plain{{}}
maybe a function like twig's dump could be added.The text was updated successfully, but these errors were encountered: