Skip to content

Commit 8721880

Browse files
author
Florian Eckerstorfer
committed
Update README with information about bundle
1 parent 5911fee commit 8721880

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Features
1818
- No external dependencies (except PHPUnit for testing).
1919
- PSR-4 compatible
2020
- Compatible with PHP >= 5.3.3 and [HHVM](http://hhvm.com)
21+
- Integration as service for the Symfony2 framework
2122

2223

2324
Installation
@@ -53,6 +54,32 @@ echo $slugify->slugify('Hello World!', '_'); // hello_world
5354
The library also contains `Cocur\Slugify\SlugifyInterface`. Use this interface whenever you reference a type in your code.
5455

5556

57+
Integrations
58+
------------
59+
60+
### Symfony2
61+
62+
Slugify contains a Symfony2 bundle and service definition that allow you to use it as a service in your Symfony2 application. The code resides in the `Cocur\Slugify\Bridge\Bundle` namespace and you only need to add the bundle class to your `AppKernel.php`:
63+
64+
```php
65+
# app/AppKernel.php
66+
67+
class AppKernel extends Kernel
68+
{
69+
public function registerBundles()
70+
{
71+
$bundles = array(
72+
// ...
73+
new Cocur\Slugify\Bridge\Bundle\CocurSlugifyBundle(),
74+
);
75+
// ...
76+
}
77+
78+
// ...
79+
}
80+
```
81+
82+
5683
Changelog
5784
---------
5885

0 commit comments

Comments
 (0)