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

Popular posts from this blog

c - CUDA code not processing if block properly -

Android Capture Image From Camera -

Define custom list-style-type in CSS -