M
M
myxasa2017-03-15 10:09:38
Yii
myxasa, 2017-03-15 10:09:38

Why is Yii:$app bad?

From the point of view of OOP
, you will not find this in a symphony.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
OnYourLips, 2017-03-15
@myxasa

This is the Service Locator antipattern.
Hiding dependencies, hard dependency on this SL, violation of encapsulation makes it difficult to work with static analysis tools.

you don't see that in the symphony.
You need to understand that these frameworks have different goals and objectives. Yii is better compared to Laravel, and in Laravel there is enough of this ("facades").

A
Artem, 2017-03-15
@proudmore

Obviously, the fact that it can be used in any context, as a global variable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question