slugify icon indicating copy to clipboard operation
slugify copied to clipboard

Need for a constructor

Open flevour opened this issue 13 years ago • 1 comments

Hi there, I sent #6 but I was thinking if there is a strong need to have an instance here. As a user I would only care about having Slugify::slugify($string) and not care about implementation, because I'd expect it to default to the best mode available. Do you know of use cases where the user would explicitly need a specific implementation?

flevour avatar Apr 17 '13 12:04 flevour

When you can instantiate a concrete object you can inject it into an other class. This is not really possible with static classes/methods.

florianeckerstorfer avatar Apr 17 '13 15:04 florianeckerstorfer