{"action":"created","issue":{"url":"https://api.github.com/repos/fenom-template/fenom/issues/230","repository_url":"https://api.github.com/repos/fenom-template/fenom","labels_url":"https://api.github.com/repos/fenom-template/fenom/issues/230/labels{/name}","comments_url":"https://api.github.com/repos/fenom-template/fenom/issues/230/comments","events_url":"https://api.github.com/repos/fenom-template/fenom/issues/230/events","html_url":"https://github.com/fenom-template/fenom/issues/230","id":155966168,"number":230,"title":"Глобальные переменные, доступные для модификации","user":{"login":"Sleuthhound","id":1821565,"avatar_url":"https://avatars.githubusercontent.com/u/1821565?v=3","gravatar_id":"","url":"https://api.github.com/users/Sleuthhound","html_url":"https://github.com/Sleuthhound","followers_url":"https://api.github.com/users/Sleuthhound/followers","following_url":"https://api.github.com/users/Sleuthhound/following{/other_user}","gists_url":"https://api.github.com/users/Sleuthhound/gists{/gist_id}","starred_url":"https://api.github.com/users/Sleuthhound/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sleuthhound/subscriptions","organizations_url":"https://api.github.com/users/Sleuthhound/orgs","repos_url":"https://api.github.com/users/Sleuthhound/repos","events_url":"https://api.github.com/users/Sleuthhound/events{/privacy}","received_events_url":"https://api.github.com/users/Sleuthhound/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-05-20T13:43:48Z","updated_at":"2016-06-10T07:54:10Z","closed_at":"2016-06-10T07:54:10Z","body":"Плавно назревает вопрос, можно ли для определенных глобальных переменных добавить возможность изменения значений. Например $.session. Конечно хорошо, что я могу в шаблонах получить значения, но часто возникает потребность, в процессе, модифицировать значение. Например присвоить $.session[чего-то там] = [какое то значение]."},"comment":{"url":"https://api.github.com/repos/fenom-template/fenom/issues/comments/225116567","html_url":"https://github.com/fenom-template/fenom/issues/230#issuecomment-225116567","issue_url":"https://api.github.com/repos/fenom-template/fenom/issues/230","id":225116567,"user":{"login":"bzick","id":345384,"avatar_url":"https://avatars.githubusercontent.com/u/345384?v=3","gravatar_id":"","url":"https://api.github.com/users/bzick","html_url":"https://github.com/bzick","followers_url":"https://api.github.com/users/bzick/followers","following_url":"https://api.github.com/users/bzick/following{/other_user}","gists_url":"https://api.github.com/users/bzick/gists{/gist_id}","starred_url":"https://api.github.com/users/bzick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bzick/subscriptions","organizations_url":"https://api.github.com/users/bzick/orgs","repos_url":"https://api.github.com/users/bzick/repos","events_url":"https://api.github.com/users/bzick/events{/privacy}","received_events_url":"https://api.github.com/users/bzick/received_events","type":"User","site_admin":false},"created_at":"2016-06-10T07:54:10Z","updated_at":"2016-06-10T07:54:10Z","body":"@Sleuthhound ваша задача решается просто, если вам нужно что бы можно было писать в глобальную переменную то вам надо определить это:\r\n\r\n```php\r\n$this->fenom->addAccessorSmart('session', '$_SESSION', \\Fenom::ACCESSOR_VAR);\r\n```\r\nВторой аргумент - PHP код который будет вставлен вместо акцессора. Так что методы там прописывать нельзя - будет фаталка"}}
{"actor":{"display_login":"bzick"}}