{"action":"created","comment":{"url":"https://api.github.com/repos/fruux/sabre-xml/pulls/comments/47140864","id":47140864,"diff_hunk":"@@ -189,6 +189,27 @@ function write($rootElementName, $value, $contextUri = null) {\n \n     }\n \n+    /**\n+     * Maps the given plain-old-php-object (popo) to the given rootElementName within the given namespace.\n+     *\n+     * The $rootElement must be specified in clark notation.\n+     *\n+     * @param string $rootElementName\n+     * @param object $popo\n+     * @param string $namespace\n+     */\n+    function mapPopo($rootElementName, $popo, $namespace) {\n+        if (!is_object($popo)) {","path":"lib/Service.php","position":14,"original_position":14,"commit_id":"f771325ddbe569e79c9d36184ef6f22c14938d9d","original_commit_id":"f771325ddbe569e79c9d36184ef6f22c14938d9d","user":{"login":"evert","id":178960,"avatar_url":"https://avatars.githubusercontent.com/u/178960?v=3","gravatar_id":"","url":"https://api.github.com/users/evert","html_url":"https://github.com/evert","followers_url":"https://api.github.com/users/evert/followers","following_url":"https://api.github.com/users/evert/following{/other_user}","gists_url":"https://api.github.com/users/evert/gists{/gist_id}","starred_url":"https://api.github.com/users/evert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evert/subscriptions","organizations_url":"https://api.github.com/users/evert/orgs","repos_url":"https://api.github.com/users/evert/repos","events_url":"https://api.github.com/users/evert/events{/privacy}","received_events_url":"https://api.github.com/users/evert/received_events","type":"User","site_admin":false},"body":"It's a bit more of a design decision, because whatever we allow is what people will have to do... and elsewhere in the source generally rely on PHP class names (such as `$classMap` and `$elementMap`) so it would be internally consistent.\r\n\r\nSo between the two that would be my first choice. Not only for consistency, but it also plays a bit nicer with the idea that 'objects should be fully initialized after creation', and you can argue that a 'template object' is not a fully constructed object.","created_at":"2015-12-09T19:41:05Z","updated_at":"2015-12-09T19:41:05Z","html_url":"https://github.com/fruux/sabre-xml/pull/66#discussion_r47140864","pull_request_url":"https://api.github.com/repos/fruux/sabre-xml/pulls/66","_links":{"self":{"href":"https://api.github.com/repos/fruux/sabre-xml/pulls/comments/47140864"},"html":{"href":"https://github.com/fruux/sabre-xml/pull/66#discussion_r47140864"},"pull_request":{"href":"https://api.github.com/repos/fruux/sabre-xml/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/fruux/sabre-xml/pulls/66","id":53094838,"html_url":"https://github.com/fruux/sabre-xml/pull/66","diff_url":"https://github.com/fruux/sabre-xml/pull/66.diff","patch_url":"https://github.com/fruux/sabre-xml/pull/66.patch","issue_url":"https://api.github.com/repos/fruux/sabre-xml/issues/66","number":66,"state":"open","locked":false,"title":"added popo serializer/deserializer and Service shorthand","user":{"login":"staabm","id":120441,"avatar_url":"https://avatars.githubusercontent.com/u/120441?v=3","gravatar_id":"","url":"https://api.github.com/users/staabm","html_url":"https://github.com/staabm","followers_url":"https://api.github.com/users/staabm/followers","following_url":"https://api.github.com/users/staabm/following{/other_user}","gists_url":"https://api.github.com/users/staabm/gists{/gist_id}","starred_url":"https://api.github.com/users/staabm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staabm/subscriptions","organizations_url":"https://api.github.com/users/staabm/orgs","repos_url":"https://api.github.com/users/staabm/repos","events_url":"https://api.github.com/users/staabm/events{/privacy}","received_events_url":"https://api.github.com/users/staabm/received_events","type":"User","site_admin":false},"body":"added popo mapping on the Service class.\r\n\r\nsee enclosed test how it is expected to work.\r\nits more or less the same as initially discussed in https://github.com/fruux/sabre-xml/pull/61\r\n\r\nAfter we finished the impl. details I will iterate over the phpdocs a bit.","created_at":"2015-12-09T09:31:41Z","updated_at":"2015-12-09T19:41:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f161baceb0e961d8616f0b325442940683ebea0","assignee":{"login":"staabm","id":120441,"avatar_url":"https://avatars.githubusercontent.com/u/120441?v=3","gravatar_id":"","url":"https://api.github.com/users/staabm","html_url":"https://github.com/staabm","followers_url":"https://api.github.com/users/staabm/followers","following_url":"https://api.github.com/users/staabm/following{/other_user}","gists_url":"https://api.github.com/users/staabm/gists{/gist_id}","starred_url":"https://api.github.com/users/staabm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staabm/subscriptions","organizations_url":"https://api.github.com/users/staabm/orgs","repos_url":"https://api.github.com/users/staabm/repos","events_url":"https://api.github.com/users/staabm/events{/privacy}","received_events_url":"https://api.github.com/users/staabm/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/fruux/sabre-xml/pulls/66/commits","review_comments_url":"https://api.github.com/repos/fruux/sabre-xml/pulls/66/comments","review_comment_url":"https://api.github.com/repos/fruux/sabre-xml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fruux/sabre-xml/issues/66/comments","statuses_url":"https://api.github.com/repos/fruux/sabre-xml/statuses/f771325ddbe569e79c9d36184ef6f22c14938d9d","head":{"label":"staabm:popo","ref":"popo","sha":"f771325ddbe569e79c9d36184ef6f22c14938d9d","user":{"login":"staabm","id":120441,"avatar_url":"https://avatars.githubusercontent.com/u/120441?v=3","gravatar_id":"","url":"https://api.github.com/users/staabm","html_url":"https://github.com/staabm","followers_url":"https://api.github.com/users/staabm/followers","following_url":"https://api.github.com/users/staabm/following{/other_user}","gists_url":"https://api.github.com/users/staabm/gists{/gist_id}","starred_url":"https://api.github.com/users/staabm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staabm/subscriptions","organizations_url":"https://api.github.com/users/staabm/orgs","repos_url":"https://api.github.com/users/staabm/repos","events_url":"https://api.github.com/users/staabm/events{/privacy}","received_events_url":"https://api.github.com/users/staabm/received_events","type":"User","site_admin":false},"repo":{"id":26853982,"name":"sabre-xml","full_name":"staabm/sabre-xml","owner":{"login":"staabm","id":120441,"avatar_url":"https://avatars.githubusercontent.com/u/120441?v=3","gravatar_id":"","url":"https://api.github.com/users/staabm","html_url":"https://github.com/staabm","followers_url":"https://api.github.com/users/staabm/followers","following_url":"https://api.github.com/users/staabm/following{/other_user}","gists_url":"https://api.github.com/users/staabm/gists{/gist_id}","starred_url":"https://api.github.com/users/staabm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staabm/subscriptions","organizations_url":"https://api.github.com/users/staabm/orgs","repos_url":"https://api.github.com/users/staabm/repos","events_url":"https://api.github.com/users/staabm/events{/privacy}","received_events_url":"https://api.github.com/users/staabm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/staabm/sabre-xml","description":"sabre/xml is the only XML library that you may not hate.","fork":true,"url":"https://api.github.com/repos/staabm/sabre-xml","forks_url":"https://api.github.com/repos/staabm/sabre-xml/forks","keys_url":"https://api.github.com/repos/staabm/sabre-xml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/staabm/sabre-xml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/staabm/sabre-xml/teams","hooks_url":"https://api.github.com/repos/staabm/sabre-xml/hooks","issue_events_url":"https://api.github.com/repos/staabm/sabre-xml/issues/events{/number}","events_url":"https://api.github.com/repos/staabm/sabre-xml/events","assignees_url":"https://api.github.com/repos/staabm/sabre-xml/assignees{/user}","branches_url":"https://api.github.com/repos/staabm/sabre-xml/branches{/branch}","tags_url":"https://api.github.com/repos/staabm/sabre-xml/tags","blobs_url":"https://api.github.com/repos/staabm/sabre-xml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/staabm/sabre-xml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/staabm/sabre-xml/git/refs{/sha}","trees_url":"https://api.github.com/repos/staabm/sabre-xml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/staabm/sabre-xml/statuses/{sha}","languages_url":"https://api.github.com/repos/staabm/sabre-xml/languages","stargazers_url":"https://api.github.com/repos/staabm/sabre-xml/stargazers","contributors_url":"https://api.github.com/repos/staabm/sabre-xml/contributors","subscribers_url":"https://api.github.com/repos/staabm/sabre-xml/subscribers","subscription_url":"https://api.github.com/repos/staabm/sabre-xml/subscription","commits_url":"https://api.github.com/repos/staabm/sabre-xml/commits{/sha}","git_commits_url":"https://api.github.com/repos/staabm/sabre-xml/git/commits{/sha}","comments_url":"https://api.github.com/repos/staabm/sabre-xml/comments{/number}","issue_comment_url":"https://api.github.com/repos/staabm/sabre-xml/issues/comments{/number}","contents_url":"https://api.github.com/repos/staabm/sabre-xml/contents/{+path}","compare_url":"https://api.github.com/repos/staabm/sabre-xml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/staabm/sabre-xml/merges","archive_url":"https://api.github.com/repos/staabm/sabre-xml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/staabm/sabre-xml/downloads","issues_url":"https://api.github.com/repos/staabm/sabre-xml/issues{/number}","pulls_url":"https://api.github.com/repos/staabm/sabre-xml/pulls{/number}","milestones_url":"https://api.github.com/repos/staabm/sabre-xml/milestones{/number}","notifications_url":"https://api.github.com/repos/staabm/sabre-xml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/staabm/sabre-xml/labels{/name}","releases_url":"https://api.github.com/repos/staabm/sabre-xml/releases{/id}","created_at":"2014-11-19T09:27:35Z","updated_at":"2014-11-19T09:27:36Z","pushed_at":"2015-12-09T18:15:57Z","git_url":"git://github.com/staabm/sabre-xml.git","ssh_url":"git@github.com:staabm/sabre-xml.git","clone_url":"https://github.com/staabm/sabre-xml.git","svn_url":"https://github.com/staabm/sabre-xml","homepage":"http://sabre.io","size":258,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fruux:master","ref":"master","sha":"c1d41630c7b80827d914e79f75ef9c4a53ad55d1","user":{"login":"fruux","id":1384629,"avatar_url":"https://avatars.githubusercontent.com/u/1384629?v=3","gravatar_id":"","url":"https://api.github.com/users/fruux","html_url":"https://github.com/fruux","followers_url":"https://api.github.com/users/fruux/followers","following_url":"https://api.github.com/users/fruux/following{/other_user}","gists_url":"https://api.github.com/users/fruux/gists{/gist_id}","starred_url":"https://api.github.com/users/fruux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fruux/subscriptions","organizations_url":"https://api.github.com/users/fruux/orgs","repos_url":"https://api.github.com/users/fruux/repos","events_url":"https://api.github.com/users/fruux/events{/privacy}","received_events_url":"https://api.github.com/users/fruux/received_events","type":"Organization","site_admin":false},"repo":{"id":6678737,"name":"sabre-xml","full_name":"fruux/sabre-xml","owner":{"login":"fruux","id":1384629,"avatar_url":"https://avatars.githubusercontent.com/u/1384629?v=3","gravatar_id":"","url":"https://api.github.com/users/fruux","html_url":"https://github.com/fruux","followers_url":"https://api.github.com/users/fruux/followers","following_url":"https://api.github.com/users/fruux/following{/other_user}","gists_url":"https://api.github.com/users/fruux/gists{/gist_id}","starred_url":"https://api.github.com/users/fruux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fruux/subscriptions","organizations_url":"https://api.github.com/users/fruux/orgs","repos_url":"https://api.github.com/users/fruux/repos","events_url":"https://api.github.com/users/fruux/events{/privacy}","received_events_url":"https://api.github.com/users/fruux/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fruux/sabre-xml","description":"sabre/xml is the only XML library that you may not hate.","fork":false,"url":"https://api.github.com/repos/fruux/sabre-xml","forks_url":"https://api.github.com/repos/fruux/sabre-xml/forks","keys_url":"https://api.github.com/repos/fruux/sabre-xml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fruux/sabre-xml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fruux/sabre-xml/teams","hooks_url":"https://api.github.com/repos/fruux/sabre-xml/hooks","issue_events_url":"https://api.github.com/repos/fruux/sabre-xml/issues/events{/number}","events_url":"https://api.github.com/repos/fruux/sabre-xml/events","assignees_url":"https://api.github.com/repos/fruux/sabre-xml/assignees{/user}","branches_url":"https://api.github.com/repos/fruux/sabre-xml/branches{/branch}","tags_url":"https://api.github.com/repos/fruux/sabre-xml/tags","blobs_url":"https://api.github.com/repos/fruux/sabre-xml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fruux/sabre-xml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fruux/sabre-xml/git/refs{/sha}","trees_url":"https://api.github.com/repos/fruux/sabre-xml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fruux/sabre-xml/statuses/{sha}","languages_url":"https://api.github.com/repos/fruux/sabre-xml/languages","stargazers_url":"https://api.github.com/repos/fruux/sabre-xml/stargazers","contributors_url":"https://api.github.com/repos/fruux/sabre-xml/contributors","subscribers_url":"https://api.github.com/repos/fruux/sabre-xml/subscribers","subscription_url":"https://api.github.com/repos/fruux/sabre-xml/subscription","commits_url":"https://api.github.com/repos/fruux/sabre-xml/commits{/sha}","git_commits_url":"https://api.github.com/repos/fruux/sabre-xml/git/commits{/sha}","comments_url":"https://api.github.com/repos/fruux/sabre-xml/comments{/number}","issue_comment_url":"https://api.github.com/repos/fruux/sabre-xml/issues/comments{/number}","contents_url":"https://api.github.com/repos/fruux/sabre-xml/contents/{+path}","compare_url":"https://api.github.com/repos/fruux/sabre-xml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fruux/sabre-xml/merges","archive_url":"https://api.github.com/repos/fruux/sabre-xml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fruux/sabre-xml/downloads","issues_url":"https://api.github.com/repos/fruux/sabre-xml/issues{/number}","pulls_url":"https://api.github.com/repos/fruux/sabre-xml/pulls{/number}","milestones_url":"https://api.github.com/repos/fruux/sabre-xml/milestones{/number}","notifications_url":"https://api.github.com/repos/fruux/sabre-xml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fruux/sabre-xml/labels{/name}","releases_url":"https://api.github.com/repos/fruux/sabre-xml/releases{/id}","created_at":"2012-11-13T22:19:13Z","updated_at":"2015-12-09T11:56:16Z","pushed_at":"2015-12-09T19:05:49Z","git_url":"git://github.com/fruux/sabre-xml.git","ssh_url":"git@github.com:fruux/sabre-xml.git","clone_url":"https://github.com/fruux/sabre-xml.git","svn_url":"https://github.com/fruux/sabre-xml","homepage":"http://sabre.io/xml/","size":279,"stargazers_count":136,"watchers_count":136,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":3,"forks":24,"open_issues":3,"watchers":136,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fruux/sabre-xml/pulls/66"},"html":{"href":"https://github.com/fruux/sabre-xml/pull/66"},"issue":{"href":"https://api.github.com/repos/fruux/sabre-xml/issues/66"},"comments":{"href":"https://api.github.com/repos/fruux/sabre-xml/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/fruux/sabre-xml/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/fruux/sabre-xml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fruux/sabre-xml/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/fruux/sabre-xml/statuses/f771325ddbe569e79c9d36184ef6f22c14938d9d"}}}}