How Configure :: write works in cakePHP

I want to understand how Configure :: write ('Config.language', 'fre'), do I need to call this function in the beforFilter () method? when I call it, does it save the configuration in the session or does not save at all?

+3
source share
2 answers

Configuring :: write () is really easy for configuring CakePHP configuration directives. You do not want to use it to record a session (in fact, it just does not work). Most likely, you bark the wrong tree if you try to use it. If it keeps state between the requests you want, check the session component at http://book.cakephp.org/view/173/Sessions

+7

:: write() . , - , Configure:: write().

Configure:: read(), .

:)

0

Source: https://habr.com/ru/post/1727295/


All Articles