weierophinney/PhlyRestfully — pull request #30 by macnibblet (2013-03-26 13:17:07+00:00)
Title: Override getIdentifier to allow for custom resource identifiers

Heya!

No better way to explain why then with a use case!

Assume you have a resource farms with the route /farms[/:id] and that farms has an association tractors. One would assumes the route/link /farms/:id/tractors and that their is a match resource tractors with the route /tractors[/:id]

Using a literal child route on farms to make this possible :id is already being used and will be define by the farm ID thus the ResourceController assumes a get instead of a getList and we don't get all the nice handling of Zend\Pagination\Pagination for our collection as one would hope.

On the downside it allows people to create very long routes /farms/1/tractors/1/drivers/1/children and so on. I don't know what you think of this ?