{"push_id":1823848597,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"59082fa015e6c25565f2cdb93b6c91f9acd4b0f7","before":"917b33034a952ca849060c6953ba87a50e4b41a0","commits":[{"sha":"59082fa015e6c25565f2cdb93b6c91f9acd4b0f7","author":{"name":"Matthew Weier O'Phinney","email":"4dc1fb8cebf1553ab7fd31206f1e48fe4714fa6e@zend.com"},"message":"Implemented collection resource generator strategies\n\nThis one required an update to the Strategy interface: instead of\npassing each of the hydrators manager, link generator, and, eventually,\nthe metadata map, to each strategy, instead the metadata map now passes\n_itself_ to strategies, along with the instance to create a resource\nfor, the metadata that matches that instance, and the request instance.\n\nI updated the URL- and route-based resource strategies to accept the new\narguments, and pull what was needed.\n\nA new trait, ExtractCollection, now has the majority of logic for\ncreating resources representing collections. It forks based on whether a\npaginator or a standard iterator was provided, and then creates:\n\n- default data for the collection resource, including `_total_items` in\n  both, and `_page` and `_page_count` for paginated sets.\n- links. If the metadata does not include a valid pagination parameter\n  type (must be one of \"query\" or \"parameter\"), and is not a paginator\n  instance, it generates only a self relational link. Otherwise, it will\n  generate a self link, and, if more than one page is present,\n  potentially each of first, prev, next, and last.\n- embedded resources. The key used is the collection relation provided\n  in the metadata, and the trait iterates over each member, passing it\n  to the resource generator's `createResource()` method.\n\nThe trait defines two abstract methods, `generateLinkForPage()` and\n`generateSelfLink()`, which its logic will call in order to generate\nlinks as needed.\n\nTwo implementations, `RouteBasedCollectionStrategy` and\n`UrlBasedCollectionStrategy`, compose the trait, define the methods\nrequired by the trait, and then delegate to `extractCollection()` to\ngenerate the collection resource itself.","distinct":true,"url":"https://api.github.com/repos/weierophinney/hal/commits/59082fa015e6c25565f2cdb93b6c91f9acd4b0f7"}]}
{"actor":{"display_login":"weierophinney"}}