You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://smarty-php.github.io)
5
+
4
6
5
7
# Smarty Debug
6
8
7
-
This library provides some Smarty template plugins for adding new language keywords for debugging templates.
9
+
> Powerful debugging tools for Smarty templates
10
+
11
+
This library extends Smarty with specialized debugging capabilities, allowing developers to easily inspect variables and troubleshoot template issues. It integrates with Symfony's VarDumper component to provide rich, formatted output of complex data structures directly in your templates.
This extension provides modifiers that help with debugging variables in your Smarty templates.
116
122
117
-
Debuging variables can be done from templates...
123
+
### debug_print_var
124
+
125
+
The `debug_print_var` modifier displays the content of a variable in a human-readable format. It works with various data types including strings, numbers, booleans, arrays, and objects.
126
+
127
+
```smarty
128
+
{$variable|debug_print_var}
129
+
```
130
+
131
+
#### Examples
132
+
133
+
**Debugging a simple variable:**
134
+
```smarty
135
+
{"Hello World"|debug_print_var}
136
+
```
118
137
119
-
...with `debug_print_var` modifier:
138
+
**Debugging an array:**
139
+
```smarty
140
+
{$userArray|debug_print_var}
141
+
```
142
+
143
+
**Debugging a template variable:**
144
+
```smarty
145
+
{$smarty.session|debug_print_var}
146
+
```
147
+
148
+
**Debugging a configuration variable:**
120
149
```smarty
121
150
{"_AD_INSTALLEDMODULES"|debug_print_var}
122
151
```
@@ -142,8 +171,20 @@ This project uses several tools to ensure code quality:
142
171
composer phpstan
143
172
```
144
173
145
-
## How to contribute?
174
+
## Documentation
175
+
176
+
API documentation is automatically generated and available in the project's wiki. For more detailed information about the classes and methods, please refer to the [project wiki](https://github.com/imponeer/smarty-debug/wiki).
177
+
178
+
## Contributing
179
+
180
+
Contributions are welcome! Here's how you can contribute:
181
+
182
+
1. Fork the repository
183
+
2. Create a feature branch: `git checkout -b feature-name`
184
+
3. Commit your changes: `git commit -am 'Add some feature'`
185
+
4. Push to the branch: `git push origin feature-name`
186
+
5. Submit a pull request
146
187
147
-
If you want to add some functionality or fix bugs, you can fork, change and create pull request. If you not sure how this works, try [interactive GitHub tutorial](https://skills.github.com).
188
+
Please make sure your code follows the PSR-12 coding standard and include tests for any new features or bug fixes.
148
189
149
-
If you found any bug or have some questions, use [issues tab](https://github.com/imponeer/smarty-debug/issues) and write there your questions.
190
+
If you find a bug or have a feature request, please create an issue in the [issue tracker](https://github.com/imponeer/smarty-debug/issues).
0 commit comments