{"action":"created","issue":{"url":"https://api.github.com/repos/graze/data-structure/issues/7","repository_url":"https://api.github.com/repos/graze/data-structure","labels_url":"https://api.github.com/repos/graze/data-structure/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/graze/data-structure/issues/7/comments","events_url":"https://api.github.com/repos/graze/data-structure/issues/7/events","html_url":"https://github.com/graze/data-structure/pull/7","id":276091411,"number":7,"title":"create a container that can access child arrays","user":{"login":"h-bragg","id":10497041,"avatar_url":"https://avatars1.githubusercontent.com/u/10497041?v=4","gravatar_id":"","url":"https://api.github.com/users/h-bragg","html_url":"https://github.com/h-bragg","followers_url":"https://api.github.com/users/h-bragg/followers","following_url":"https://api.github.com/users/h-bragg/following{/other_user}","gists_url":"https://api.github.com/users/h-bragg/gists{/gist_id}","starred_url":"https://api.github.com/users/h-bragg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h-bragg/subscriptions","organizations_url":"https://api.github.com/users/h-bragg/orgs","repos_url":"https://api.github.com/users/h-bragg/repos","events_url":"https://api.github.com/users/h-bragg/events{/privacy}","received_events_url":"https://api.github.com/users/h-bragg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-11-22T14:41:01Z","updated_at":"2017-11-24T09:39:29Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/graze/data-structure/pulls/7","html_url":"https://github.com/graze/data-structure/pull/7","diff_url":"https://github.com/graze/data-structure/pull/7.diff","patch_url":"https://github.com/graze/data-structure/pull/7.patch"},"body":"Adds a `FlatContainer` and `ImmutableFlatContainer` which allows you to access child array properties from the top level.\r\n\r\n- Handles custom delimiter\r\n- Copes with containers as children and accessing them that way \\o/\r\n\r\n## Examples\r\n\r\n```php\r\n$container = new FlatContainer(['first' => 'value', 'second' => ['child' => 1, 'other' => 2]]);\r\n\r\n$container->get('second.child')\r\n// 1\r\n\r\n($container->has('first.child'))\r\n// false\r\n\r\n$container->set('second.third', 3);\r\n$container->getAll();\r\n// ['first' => 'value', 'second' => ['child' => 1, 'other' => 2, 'third'=> 3]]\r\n\r\n$container->remove('second.other');\r\n$container->getAll();\r\n// ['first' => 'value', 'second' => ['child' => 1, 'third'=> 3]]\r\n```"},"comment":{"url":"https://api.github.com/repos/graze/data-structure/issues/comments/346785022","html_url":"https://github.com/graze/data-structure/pull/7#issuecomment-346785022","issue_url":"https://api.github.com/repos/graze/data-structure/issues/7","id":346785022,"user":{"login":"h-bragg","id":10497041,"avatar_url":"https://avatars1.githubusercontent.com/u/10497041?v=4","gravatar_id":"","url":"https://api.github.com/users/h-bragg","html_url":"https://github.com/h-bragg","followers_url":"https://api.github.com/users/h-bragg/followers","following_url":"https://api.github.com/users/h-bragg/following{/other_user}","gists_url":"https://api.github.com/users/h-bragg/gists{/gist_id}","starred_url":"https://api.github.com/users/h-bragg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h-bragg/subscriptions","organizations_url":"https://api.github.com/users/h-bragg/orgs","repos_url":"https://api.github.com/users/h-bragg/repos","events_url":"https://api.github.com/users/h-bragg/events{/privacy}","received_events_url":"https://api.github.com/users/h-bragg/received_events","type":"User","site_admin":false},"created_at":"2017-11-24T09:39:29Z","updated_at":"2017-11-24T09:39:29Z","author_association":"OWNER","body":"### Should the iterator return the `flat` structure or array structure?\r\n\r\nCurrently it returns the array structure:\r\n\r\n```php\r\n$container = new FlatContainer(['a' => 'b', 'c' => ['d' => 'e']]);\r\n\r\nforeach ($container->getIterator() as $key => $value) {\r\n    echo $key . '=>' . print_r($value, true);\r\n}\r\n// a => b\r\n// c => ['d' => 'e']\r\n```"}}
{"actor":{"display_login":"h-bragg"}}