Category : design-patterns

I am trying to create a Widget service. I have Widget class and his his children: ContactWidget, TestimonialWidget etc. They are depend from TemplateService and from User class. So using OOP features i can do it this way: Class Widget (parent): abstract class Widget { protected $client; protected $templateService; protected $template; public function __construct(TemplateService $templateService, ..

Read more