{"action":"created","issue":{"url":"https://api.github.com/repos/studio107/Mindy_Http/issues/1","labels_url":"https://api.github.com/repos/studio107/Mindy_Http/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/studio107/Mindy_Http/issues/1/comments","events_url":"https://api.github.com/repos/studio107/Mindy_Http/issues/1/events","html_url":"https://github.com/studio107/Mindy_Http/issues/1","id":105253216,"number":1,"title":"Cookie default values","user":{"login":"tsukasa-mixer","id":1190435,"avatar_url":"https://avatars.githubusercontent.com/u/1190435?v=3","gravatar_id":"","url":"https://api.github.com/users/tsukasa-mixer","html_url":"https://github.com/tsukasa-mixer","followers_url":"https://api.github.com/users/tsukasa-mixer/followers","following_url":"https://api.github.com/users/tsukasa-mixer/following{/other_user}","gists_url":"https://api.github.com/users/tsukasa-mixer/gists{/gist_id}","starred_url":"https://api.github.com/users/tsukasa-mixer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsukasa-mixer/subscriptions","organizations_url":"https://api.github.com/users/tsukasa-mixer/orgs","repos_url":"https://api.github.com/users/tsukasa-mixer/repos","events_url":"https://api.github.com/users/tsukasa-mixer/events{/privacy}","received_events_url":"https://api.github.com/users/tsukasa-mixer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/studio107/Mindy_Http/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"max107","id":862272,"avatar_url":"https://avatars.githubusercontent.com/u/862272?v=3","gravatar_id":"","url":"https://api.github.com/users/max107","html_url":"https://github.com/max107","followers_url":"https://api.github.com/users/max107/followers","following_url":"https://api.github.com/users/max107/following{/other_user}","gists_url":"https://api.github.com/users/max107/gists{/gist_id}","starred_url":"https://api.github.com/users/max107/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/max107/subscriptions","organizations_url":"https://api.github.com/users/max107/orgs","repos_url":"https://api.github.com/users/max107/repos","events_url":"https://api.github.com/users/max107/events{/privacy}","received_events_url":"https://api.github.com/users/max107/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-09-07T18:08:11Z","updated_at":"2015-09-08T11:49:48Z","closed_at":"2015-09-08T11:16:28Z","body":"В новых создаваемых кукисах значения по умолчанию вхардкожены и если кукисы вызываются компонентами то их настройки не изменить.\r\nПри инициализации сессии устанавливаются нужные по умолчанию настроки кукисов (сессионных).\r\nПредалгаю при создании нового обьекта Cookie просто инициализировать его с значениями по умолчанию уже объявленными глобально.\r\n\r\nт.е. сделать как-то так\r\n\r\n```php\r\nclass Cookie\r\n{\r\n    ...\r\n\r\n    public function __construct($name, $value, $options = array())\r\n    {\r\n        $this->name = $name;\r\n        $this->value = $value;\r\n\r\n        $data = session_get_cookie_params();\r\n        extract($data);\r\n        $this->expire   = $lifetime;\r\n        $this->path     = $path;\r\n        $this->domain   = $domain;\r\n        $this->secure   = $secure;\r\n        $this->httpOnly = $httponly;\r\n\r\n        $this->configure($options);\r\n    }\r\n\r\n    ...\r\n}"},"comment":{"url":"https://api.github.com/repos/studio107/Mindy_Http/issues/comments/138530028","html_url":"https://github.com/studio107/Mindy_Http/issues/1#issuecomment-138530028","issue_url":"https://api.github.com/repos/studio107/Mindy_Http/issues/1","id":138530028,"user":{"login":"max107","id":862272,"avatar_url":"https://avatars.githubusercontent.com/u/862272?v=3","gravatar_id":"","url":"https://api.github.com/users/max107","html_url":"https://github.com/max107","followers_url":"https://api.github.com/users/max107/followers","following_url":"https://api.github.com/users/max107/following{/other_user}","gists_url":"https://api.github.com/users/max107/gists{/gist_id}","starred_url":"https://api.github.com/users/max107/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/max107/subscriptions","organizations_url":"https://api.github.com/users/max107/orgs","repos_url":"https://api.github.com/users/max107/repos","events_url":"https://api.github.com/users/max107/events{/privacy}","received_events_url":"https://api.github.com/users/max107/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T11:49:48Z","updated_at":"2015-09-08T11:49:48Z","body":"Реализовал так:\r\n\r\n```php\r\nclass Cookie\r\n{\r\n...\r\n    public function __construct($name, $value, $options = [])\r\n    {\r\n        $this->name = $name;\r\n        $this->value = $value;\r\n\r\n        unset($options['name'], $options['value']);\r\n\r\n        $this->configure(array_merge(session_get_cookie_params(), $options));\r\n    }\r\n...\r\n}\r\n```"}}