{"action":"created","comment":{"url":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments/59134688","id":59134688,"diff_hunk":"@@ -365,8 +371,226 @@ You can also mix objects and arrays::\n     var_dump('Hello '.$accessor->getValue($person, 'children[0].firstName')); // 'Wouter'\n     // equal to $person->getChildren()[0]->firstName\n \n+Custom method calls and virtual properties in a class\n+-----------------------------------------------------\n+\n+Sometimes you may not want the component to guess which method has to be called\n+when reading or writing properties. This is specially interesting when property\n+names are not in English or its singularization is not properly detected.\n+\n+For those cases you can add metadata to the class being accessed so that the\n+component will use a particular method as a getter, setter or even adder and\n+remover (for collections).\n+\n+Another interesting use of custom methods is declaring virtual properties\n+which are not stored directly in the object.\n+\n+There are three supported ways to state this metadata supported out-of-the-box by\n+the component: using annotations, using YAML configuration files or using XML\n+configuration files.\n+\n+.. caution::\n+\n+    When using as a standalone component the metadata feature is disabled by\n+    default. You can enable it by calling\n+    :method:`PropertyAccessorBuilder::setMetadataFactory\n+    <Symfony\\\\Component\\\\PropertyAccess\\\\PropertyAccessorBuilder::setMetadataFactory>`\n+    see `Enable other Features`_.\n+\n+There are four method calls that can be overriden: `getter`, `setter`, `adder` and\n+`remover`.\n+\n+When using annotations you can precede a property with `@Property` to state which\n+method should be called when a get, set, add or remove operation is needed on the\n+property.\n+\n+.. configuration-block::\n+\n+    .. code-block:: php","path":"components/property_access/introduction.rst","position":59,"original_position":59,"commit_id":"d0d5591ebc565af02db9bc43f80736f39554fcee","original_commit_id":"d0d5591ebc565af02db9bc43f80736f39554fcee","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"body":"Minor improvement: please use `.. code-block:: php-annotations` instead of `.. code-block:: php`","created_at":"2016-04-10T14:18:16Z","updated_at":"2016-04-10T14:18:16Z","html_url":"https://github.com/symfony/symfony-docs/pull/6400#discussion_r59134688","pull_request_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/6400","_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments/59134688"},"html":{"href":"https://github.com/symfony/symfony-docs/pull/6400#discussion_r59134688"},"pull_request":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/6400"}}},"pull_request":{"url":"https://api.github.com/repos/symfony/symfony-docs/pulls/6400","id":64223480,"html_url":"https://github.com/symfony/symfony-docs/pull/6400","diff_url":"https://github.com/symfony/symfony-docs/pull/6400.diff","patch_url":"https://github.com/symfony/symfony-docs/pull/6400.patch","issue_url":"https://api.github.com/repos/symfony/symfony-docs/issues/6400","number":6400,"state":"open","locked":false,"title":"[PropertyAccess] Custom methods on property accesses","user":{"login":"lrlopez","id":547387,"avatar_url":"https://avatars.githubusercontent.com/u/547387?v=3","gravatar_id":"","url":"https://api.github.com/users/lrlopez","html_url":"https://github.com/lrlopez","followers_url":"https://api.github.com/users/lrlopez/followers","following_url":"https://api.github.com/users/lrlopez/following{/other_user}","gists_url":"https://api.github.com/users/lrlopez/gists{/gist_id}","starred_url":"https://api.github.com/users/lrlopez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrlopez/subscriptions","organizations_url":"https://api.github.com/users/lrlopez/orgs","repos_url":"https://api.github.com/users/lrlopez/repos","events_url":"https://api.github.com/users/lrlopez/events{/privacy}","received_events_url":"https://api.github.com/users/lrlopez/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Doc fix?      | no\r\n| New docs?     | yes: https://github.com/symfony/symfony/pull/18016\r\n| Applies to    | Property access\r\n| Fixed tickets | None\r\n","created_at":"2016-03-26T01:02:45Z","updated_at":"2016-04-10T14:18:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed3c9265dec1b90629168f882b7c8134a55b5987","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/6400/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/6400/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony-docs/issues/6400/comments","statuses_url":"https://api.github.com/repos/symfony/symfony-docs/statuses/d0d5591ebc565af02db9bc43f80736f39554fcee","head":{"label":"lrlopez:property_access_docs","ref":"property_access_docs","sha":"d0d5591ebc565af02db9bc43f80736f39554fcee","user":{"login":"lrlopez","id":547387,"avatar_url":"https://avatars.githubusercontent.com/u/547387?v=3","gravatar_id":"","url":"https://api.github.com/users/lrlopez","html_url":"https://github.com/lrlopez","followers_url":"https://api.github.com/users/lrlopez/followers","following_url":"https://api.github.com/users/lrlopez/following{/other_user}","gists_url":"https://api.github.com/users/lrlopez/gists{/gist_id}","starred_url":"https://api.github.com/users/lrlopez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrlopez/subscriptions","organizations_url":"https://api.github.com/users/lrlopez/orgs","repos_url":"https://api.github.com/users/lrlopez/repos","events_url":"https://api.github.com/users/lrlopez/events{/privacy}","received_events_url":"https://api.github.com/users/lrlopez/received_events","type":"User","site_admin":false},"repo":{"id":54734736,"name":"symfony-docs","full_name":"lrlopez/symfony-docs","owner":{"login":"lrlopez","id":547387,"avatar_url":"https://avatars.githubusercontent.com/u/547387?v=3","gravatar_id":"","url":"https://api.github.com/users/lrlopez","html_url":"https://github.com/lrlopez","followers_url":"https://api.github.com/users/lrlopez/followers","following_url":"https://api.github.com/users/lrlopez/following{/other_user}","gists_url":"https://api.github.com/users/lrlopez/gists{/gist_id}","starred_url":"https://api.github.com/users/lrlopez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrlopez/subscriptions","organizations_url":"https://api.github.com/users/lrlopez/orgs","repos_url":"https://api.github.com/users/lrlopez/repos","events_url":"https://api.github.com/users/lrlopez/events{/privacy}","received_events_url":"https://api.github.com/users/lrlopez/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lrlopez/symfony-docs","description":"The Symfony documentation","fork":true,"url":"https://api.github.com/repos/lrlopez/symfony-docs","forks_url":"https://api.github.com/repos/lrlopez/symfony-docs/forks","keys_url":"https://api.github.com/repos/lrlopez/symfony-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lrlopez/symfony-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lrlopez/symfony-docs/teams","hooks_url":"https://api.github.com/repos/lrlopez/symfony-docs/hooks","issue_events_url":"https://api.github.com/repos/lrlopez/symfony-docs/issues/events{/number}","events_url":"https://api.github.com/repos/lrlopez/symfony-docs/events","assignees_url":"https://api.github.com/repos/lrlopez/symfony-docs/assignees{/user}","branches_url":"https://api.github.com/repos/lrlopez/symfony-docs/branches{/branch}","tags_url":"https://api.github.com/repos/lrlopez/symfony-docs/tags","blobs_url":"https://api.github.com/repos/lrlopez/symfony-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lrlopez/symfony-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lrlopez/symfony-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/lrlopez/symfony-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lrlopez/symfony-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/lrlopez/symfony-docs/languages","stargazers_url":"https://api.github.com/repos/lrlopez/symfony-docs/stargazers","contributors_url":"https://api.github.com/repos/lrlopez/symfony-docs/contributors","subscribers_url":"https://api.github.com/repos/lrlopez/symfony-docs/subscribers","subscription_url":"https://api.github.com/repos/lrlopez/symfony-docs/subscription","commits_url":"https://api.github.com/repos/lrlopez/symfony-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/lrlopez/symfony-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/lrlopez/symfony-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/lrlopez/symfony-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/lrlopez/symfony-docs/contents/{+path}","compare_url":"https://api.github.com/repos/lrlopez/symfony-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lrlopez/symfony-docs/merges","archive_url":"https://api.github.com/repos/lrlopez/symfony-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lrlopez/symfony-docs/downloads","issues_url":"https://api.github.com/repos/lrlopez/symfony-docs/issues{/number}","pulls_url":"https://api.github.com/repos/lrlopez/symfony-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/lrlopez/symfony-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/lrlopez/symfony-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lrlopez/symfony-docs/labels{/name}","releases_url":"https://api.github.com/repos/lrlopez/symfony-docs/releases{/id}","deployments_url":"https://api.github.com/repos/lrlopez/symfony-docs/deployments","created_at":"2016-03-25T17:22:00Z","updated_at":"2016-03-25T17:22:04Z","pushed_at":"2016-04-02T00:09:45Z","git_url":"git://github.com/lrlopez/symfony-docs.git","ssh_url":"git@github.com:lrlopez/symfony-docs.git","clone_url":"https://github.com/lrlopez/symfony-docs.git","svn_url":"https://github.com/lrlopez/symfony-docs","homepage":"http://symfony.com/doc","size":33998,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"symfony:master","ref":"master","sha":"10ea5e9445ba9cf45e1cb98afe8977276af2ad6d","user":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"repo":{"id":521583,"name":"symfony-docs","full_name":"symfony/symfony-docs","owner":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symfony/symfony-docs","description":"The Symfony documentation","fork":false,"url":"https://api.github.com/repos/symfony/symfony-docs","forks_url":"https://api.github.com/repos/symfony/symfony-docs/forks","keys_url":"https://api.github.com/repos/symfony/symfony-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony/symfony-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony/symfony-docs/teams","hooks_url":"https://api.github.com/repos/symfony/symfony-docs/hooks","issue_events_url":"https://api.github.com/repos/symfony/symfony-docs/issues/events{/number}","events_url":"https://api.github.com/repos/symfony/symfony-docs/events","assignees_url":"https://api.github.com/repos/symfony/symfony-docs/assignees{/user}","branches_url":"https://api.github.com/repos/symfony/symfony-docs/branches{/branch}","tags_url":"https://api.github.com/repos/symfony/symfony-docs/tags","blobs_url":"https://api.github.com/repos/symfony/symfony-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony/symfony-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony/symfony-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony/symfony-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony/symfony-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony/symfony-docs/languages","stargazers_url":"https://api.github.com/repos/symfony/symfony-docs/stargazers","contributors_url":"https://api.github.com/repos/symfony/symfony-docs/contributors","subscribers_url":"https://api.github.com/repos/symfony/symfony-docs/subscribers","subscription_url":"https://api.github.com/repos/symfony/symfony-docs/subscription","commits_url":"https://api.github.com/repos/symfony/symfony-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony/symfony-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony/symfony-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony/symfony-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony/symfony-docs/contents/{+path}","compare_url":"https://api.github.com/repos/symfony/symfony-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony/symfony-docs/merges","archive_url":"https://api.github.com/repos/symfony/symfony-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony/symfony-docs/downloads","issues_url":"https://api.github.com/repos/symfony/symfony-docs/issues{/number}","pulls_url":"https://api.github.com/repos/symfony/symfony-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony/symfony-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony/symfony-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony/symfony-docs/labels{/name}","releases_url":"https://api.github.com/repos/symfony/symfony-docs/releases{/id}","deployments_url":"https://api.github.com/repos/symfony/symfony-docs/deployments","created_at":"2010-02-17T08:43:51Z","updated_at":"2016-04-04T03:56:51Z","pushed_at":"2016-04-10T10:04:04Z","git_url":"git://github.com/symfony/symfony-docs.git","ssh_url":"git@github.com:symfony/symfony-docs.git","clone_url":"https://github.com/symfony/symfony-docs.git","svn_url":"https://github.com/symfony/symfony-docs","homepage":"http://symfony.com/doc","size":54176,"stargazers_count":1090,"watchers_count":1090,"language":"C++","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":2353,"mirror_url":null,"open_issues_count":306,"forks":2353,"open_issues":306,"watchers":1090,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/6400"},"html":{"href":"https://github.com/symfony/symfony-docs/pull/6400"},"issue":{"href":"https://api.github.com/repos/symfony/symfony-docs/issues/6400"},"comments":{"href":"https://api.github.com/repos/symfony/symfony-docs/issues/6400/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/6400/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/6400/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony-docs/statuses/d0d5591ebc565af02db9bc43f80736f39554fcee"}}}}