Skip to content

Commit

Permalink
Add addRule example
Browse files Browse the repository at this point in the history
  • Loading branch information
mac2000 committed Aug 25, 2014
1 parent 2f2a280 commit 4b67224
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ echo $slugify->slugify('Hello World!', '_'); // hello_world

The library also contains `Cocur\Slugify\SlugifyInterface`. Use this interface whenever you need to typehint an instance of `Slugify`.

To change transliteration rules use `addRule` method, like this:

```php
$slugify->addRule('i', 'ey');
echo $slugify->slugify('Hi'); // hey
```

### Further information

- [API docs](http://cocur.co/slugify/api/master/)
Expand Down

0 comments on commit 4b67224

Please sign in to comment.