Set normalization callbacks
array $callbacks help normalize the result:
InvalidArgumentException if a non-callable callback is set
public function setCallbacks(array $callbacks) {
foreach ($callbacks as $attribute => $callback) {
if (!is_callable($callback)) {
throw new InvalidArgumentException(sprintf('The given callback for attribute "%s" is not callable.', $attribute));
}
}
$this->callbacks = $callbacks;
}