bnnvara/common

This package is abandoned and no longer maintained. No replacement package was suggested.

Common packages for use in projects

dev-master 2017-09-13 06:37 UTC

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