zendframework/zf2 — pull request #3230 by bondvt04 (2012-12-15 16:15:52+00:00)
Title: Add Zend\Stdlib\Hydrator\Strategy\ClosureStrategy

Example of use:
$hydrator->addStrategy('category', new ClosureStrategy(
function(Category $value) {
return (int)$value->id;
},
function($value) {
return new Category((int)$value);
}
));