src/ImboClient/Http/ImageUrl.php
public function blur(array $params) {
        $mode = isset($params['mode']) ? $params['mode'] : null;
        $required = array('radius', 'sigma');

        if ($mode === 'motion') {
            $required[] = 'angle';
        } else if ($mode === 'radial') {
            $required = array('angle');
        }

        $transformation = $mode ? array('mode=' . $mode) : array();

        foreach ($required as $param) {
            if (!isset($params[$param])) {
                throw new InvalidArgumentException('`' . $param . '` must be specified');
            }

            $transformation[] = $param . '=' . $params[$param];
        }

        return $this->addTransformation(sprintf('blur:%s', implode(',', $transformation)));
    }
public function blur(array $params) {
        $mode = isset($params['mode']) ? $params['mode'] : null;
        $required = array('radius', 'sigma');

        if ($mode === 'motion') {
            $required[] = 'angle';
        } else if ($mode === 'radial') {
            $required = array('angle');
        }

        $transformation = $mode ? array('mode=' . $mode) : array();

        foreach ($required as $param) {
            if (!isset($params[$param])) {
                throw new InvalidArgumentException('`' . $param . '` must be specified');
            }

            $transformation[] = $param . '=' . $params[$param];
        }

        return $this->addTransformation(sprintf('blur:%s', implode(',', $transformation)));
    }
public function blur ( array $ params ) { $ mode = isset ( $ params [ 'mode' ] ) ? $ params [ 'mode' ] : null ; $ required = array ( 'radius' , 'sigma' ) ; if ( $ mode === 'motion' ) { $ required [ ] = 'angle' ; } else if ( $ mode === 'radial' ) { $ required = array ( 'angle' ) ; } $ transformation = $ mode ? array ( 'mode=' . $ mode ) : array ( ) ; foreach ( $ required as $ param ) { if ( ! isset ( $ params [ $ param ] ) ) { throw new InvalidArgumentException ( '`' . $ param . '` must be specified' ) ; } $ transformation [ ] = $ param . '=' . $ params [ $ param ] ; } return $ this -> addTransformation ( sprintf ( 'blur:%s' , implode ( ',' , $ transformation ) ) ) ; }
Add a blur transformation

Parameters:
`mode`   - `gaussian`, `adaptive`, `motion` or `radial`. Default: `guassian`

`radius` - Radius of the gaussian, in pixels, not counting the center pixel.
Required for `gaussian`, `adaptive` and `motion`-modes

`sigma`  - The standard deviation of the gaussian, in pixels.
Required for `gaussian`, `adaptive` and `motion`-modes

`angle`  - Angle of the radial blur. Only used in `radial`-mode.

@param array $params Array of parameters
@return self
Add a blur transformation