U
U
unfapable2016-01-24 18:58:48
1C-Bitrix
unfapable, 2016-01-24 18:58:48

How does Bitrix call static methods?

Hello everyone, not so long ago I started working with Bitrix, a question arose, probably a noob one, but very entertaining for me. So, in Bitrix, for example, there is a CIBlockElement::GetList() method, it is called as static, but in the source code there is, roughly speaking, no definition of function public static GetList() ... Why, in this case, is it called as static and does this work great?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Express777, 2016-01-25
@unfapable

Because the method is
dynamic, not static.
In theory it should be called like this

$myObject = new CIBlockElement;
$myObject->GetList();

Why are they called like that?
Because everyone (by ****) is not too important. The main thing works because the language allows you to do so. Call dynamic methods like static methods.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question