zfcampus/zf-hal — pull request #26 by tjlytle (2014-03-31 18:06:22+00:00)
Title: Allow the metdata route params to include callables:

- On entity creation, any callable is passed the object the entity
is being created from.
- If the callable is a closure, and bindTo() is supported, the
closure is bound to the object.
- The return value replaces the callable in the route param array
before the array is passed to the Link.

Example with callable:
'route_params' => [
'parent_id' => [$someService, 'getParentId']
]

Example with binding:
'route_params' => [
'parent_id' => function(){
return $this->getParent()->getId();
}
]