private function thumbnail(array $params)
    {
        $mode = isset($params['mode']) ? $params['mode'] : self::THUMBNAIL_OUTBOUND;

        $width = (isset($params['width']) && is_numeric($params['width'])) ? $params['width'] : null;
        $height = (isset($params['height']) && is_numeric($params['height'])) ? $params['height'] : null;

        if (is_null($width) || is_null($height)) {
            throw new Exception('Wrong thumbnail width or height');
        }

        $this->image = $this->image->thumbnail(new Box($width, $height), $mode);
    }
private function thumbnail(array $params)
    {
        $mode = isset($params['mode']) ? $params['mode'] : self::THUMBNAIL_OUTBOUND;

        $width = (isset($params['width']) && is_numeric($params['width'])) ? $params['width'] : null;
        $height = (isset($params['height']) && is_numeric($params['height'])) ? $params['height'] : null;

        if (is_null($width) || is_null($height)) {
            throw new Exception('Wrong thumbnail width or height');
        }

        $this->image = $this->image->thumbnail(new Box($width, $height), $mode);
    }
private function thumbnail ( array $ params ) { $ mode = isset ( $ params [ 'mode' ] ) ? $ params [ 'mode' ] : self :: THUMBNAIL_OUTBOUND ; $ width = ( isset ( $ params [ 'width' ] ) && is_numeric ( $ params [ 'width' ] ) ) ? $ params [ 'width' ] : null ; $ height = ( isset ( $ params [ 'height' ] ) && is_numeric ( $ params [ 'height' ] ) ) ? $ params [ 'height' ] : null ; if ( is_null ( $ width ) || is_null ( $ height ) ) { throw new Exception ( 'Wrong thumbnail width or height' ) ; } $ this -> image = $ this -> image -> thumbnail ( new Box ( $ width , $ height ) , $ mode ) ; }
Make thumbnail image
@param array $params
Make thumbnail image