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;
    }
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;
    }
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 ; }
Set normalization callbacks

@param array $callbacks help normalize the result

@throws InvalidArgumentException if a non-callable callback is set
Set normalization callbacks