S
S
semki0962017-01-03 13:44:57
PHP
semki096, 2017-01-03 13:44:57

What does the $this->persistent->parameters line of code do?

What does the second line of code in the index method of the controller (Phalcon) do?

public function indexAction() {
        $this->persistent->parameters = null;
...

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
darksladen, 2017-01-03
@semki096

read here ! This is an object whose properties are stored within a class. In your case, it's the parameters property, which obviously resets the parameters for the class.

B
Boris Yakushev, 2017-01-03
@za4me

Obviously, it sets $this->persistent->parameters to null.
In general, open the documentation, it will indicate.
If you understand correctly, then see the phalcon documentation on controllers.

O
OnYourLips, 2017-01-03
@OnYourLips

The law of Demeter is violated here: https://ru.wikipedia.org/wiki/%D0%97%D0%B0%D0%BA%D...
It is better not to write such code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question