bnnvara / common
Common packages for use in projects
Requires
- php: ^5.3.3 || ^7.0
Requires (Dev)
- phpunit/phpunit: 5.7.21
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2018-05-19 07:27:02 UTC
README
some code snippets for common use.
Paginator
For use of the paginator you must implement the Router interface. If using symfony framework you should make a Router extend the Symfony Router and implement the router interface of the Paginator. The only method in the interface is already implemented in the Symfony router so no custom implementation is needed.
Slugifier
Abstract class which can be used directly Slugifier::slugify($string_to_slugify)
TODO: the slugifier should use a decorator pattern
Truncator
Abstract class which can be used directly Trancator::truncate($string, $limit, $ellipsis) The ellipsis is optional (default is ...)