OOP PHP Design Patterns | Null Object Pattern

preview_player
Показать описание
ℹ Null object is a design pattern which enables you to satisfy a piece of code's expectation that an object will be present...except the object does not do anything apart from that...a bit like a placebo!

💻Source code here:

👇Follow me on Social Media:

💕Show support:
Рекомендации по теме
Комментарии
Автор

People view but don't comment or like why? yet they even download!
I love your tuts and explanations.

Thank you

ssekiziyivugodfrey-gramaxi
Автор

i have multiple questions

1. why dont one just not create the RandomProcessor if the requirements arent met?
2. arent exceptions something good? atleast i want to know, where exactly the problem originates, instead of just randomly see that my process isnt working at all. who will recognize the random processor didnt process like he should?
3. why is true the right return and not false? id say false would be correct, as nothing happened

janbeumer