php - Laravel Swapping interface dependancies -
i've been learning lot coding interface instead of coding concrete class. i'm wondering if following approach practice.
let's have notifier class using following structure
-app --acme notifiers - mailnotifier -mailnotifier.php - notifierinterface.php - notifierserviceprovider.php
is practice if later want add different sort of notifier? text notifier example.
thank you!
yes, that's example use of interfaces. if future class has functionality can described same function names , structure go it.
Comments
Post a Comment