Skip to content

Commit 9e96a92

Browse files
authored
Merge pull request #34 from MekDrop/improve-readme
Improve readme
2 parents be7dda2 + 466a348 commit 9e96a92

File tree

1 file changed

+49
-8
lines changed

1 file changed

+49
-8
lines changed

README.md

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
[![License](https://img.shields.io/github/license/imponeer/smarty-debug.svg)](LICENSE)
2-
[![GitHub release](https://img.shields.io/github/release/imponeer/smarty-debug.svg)](https://github.com/imponeer/smarty-debug/releases) [![Maintainability](https://api.codeclimate.com/v1/badges/79f89e2fe21c0076c29a/maintainability)](https://codeclimate.com/github/imponeer/smarty-debug/maintainability) [![PHP](https://img.shields.io/packagist/php-v/imponeer/smarty-debug.svg)](http://php.net)
2+
[![GitHub release](https://img.shields.io/github/release/imponeer/smarty-debug.svg)](https://github.com/imponeer/smarty-debug/releases) [![PHP](https://img.shields.io/packagist/php-v/imponeer/smarty-debug.svg)](http://php.net)
33
[![Packagist](https://img.shields.io/packagist/dm/imponeer/smarty-debug.svg)](https://packagist.org/packages/imponeer/smarty-debug)
4+
[![Smarty version requirement](https://img.shields.io/packagist/dependency-v/imponeer/smarty-debug/smarty%2Fsmarty)](https://smarty-php.github.io)
5+
46

57
# Smarty Debug
68

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.
812

913
## Installation
1014

@@ -112,11 +116,36 @@ $smarty = $container->get(\Smarty\Smarty::class);
112116
```
113117

114118

115-
## Using from templates
119+
## Usage
120+
121+
This extension provides modifiers that help with debugging variables in your Smarty templates.
116122

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+
```
118137

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:**
120149
```smarty
121150
{"_AD_INSTALLEDMODULES"|debug_print_var}
122151
```
@@ -142,8 +171,20 @@ This project uses several tools to ensure code quality:
142171
composer phpstan
143172
```
144173

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
146187

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.
148189

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

Comments
 (0)