Now that I think of it, there's https://github.com/zendframework/zf2/blob/release-2.2.1/library/Zend/Stdlib/Hydrator/Filter/OptionalParametersFilter.php which could be used here (and is cached internally)