M
M
Maxim2016-04-14 09:52:40
Yii
Maxim, 2016-04-14 09:52:40

Explanations for yii2?

Tell me, please, what is this and do I understand correctly?
PS I'm familiar with OOP, I'm studying in detail.
Here in yii2
Yii::$app->session->setFlash
Yii::$app - here, as I understand it:
Yii is a (namespace) abbreviated name where to refer to the Yii class.
Next, :: this is what we are accessing the $app property of the Yii class.
But further it is not clear, -> is this a call to the method (as far as I understand) in which we turn to the setFlash method?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrzej Wielski, 2016-04-14
@KidsBout

You understand right.
Yii is a class, :: - access to the static object $app, ->session access to the public session object of the $app object, ->setFlash respectively access to the object

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question