Why Are Classes Divided Into Basefoo And Foo?

Why are classes divided into BaseFoo and Foo?

Why aren’t used abstract classes instead?

:huh:

Good question.

Probably, its a Yii2 vision for future… multiple classes being extended from the same BaseFoo class.

For example FileHelper1, FileHelper2 maybe.

See this: https://github.com/yiisoft/yii2/blob/master/docs/guide/helpers.md#extending-helper-classes

Thanks guys!

Anyway, shouldn’t BaseFoo classes be abstract?

They’re not abstract, they actually implement the logic.

It doesn’t make any sense since nothing prevents you from calling a static method of an abstract class.