public static function fromArray(array $items = [], Blueprint $blueprint = null)
    {
        $type = $items['type'] ?? null;

        switch ($type) {
            case 'image':
                return new ImageMedium($items, $blueprint);
            case 'thumbnail':
                return new ThumbnailImageMedium($items, $blueprint);
            case 'animated':
            case 'vector':
                return new StaticImageMedium($items, $blueprint);
            case 'video':
                return new VideoMedium($items, $blueprint);
            case 'audio':
                return new AudioMedium($items, $blueprint);
            default:
                return new Medium($items, $blueprint);
        }
    }
public static function fromArray(array $items = [], Blueprint $blueprint = null)
    {
        $type = $items['type'] ?? null;

        switch ($type) {
            case 'image':
                return new ImageMedium($items, $blueprint);
            case 'thumbnail':
                return new ThumbnailImageMedium($items, $blueprint);
            case 'animated':
            case 'vector':
                return new StaticImageMedium($items, $blueprint);
            case 'video':
                return new VideoMedium($items, $blueprint);
            case 'audio':
                return new AudioMedium($items, $blueprint);
            default:
                return new Medium($items, $blueprint);
        }
    }
public static function fromArray ( array $ items = [ ] , Blueprint $ blueprint = null ) { $ type = $ items [ 'type' ] ?? null ; switch ( $ type ) { case 'image' : return new ImageMedium ( $ items , $ blueprint ) ; case 'thumbnail' : return new ThumbnailImageMedium ( $ items , $ blueprint ) ; case 'animated' : case 'vector' : return new StaticImageMedium ( $ items , $ blueprint ) ; case 'video' : return new VideoMedium ( $ items , $ blueprint ) ; case 'audio' : return new AudioMedium ( $ items , $ blueprint ) ; default : return new Medium ( $ items , $ blueprint ) ; } }
Create Medium from array of parameters

@param  array          $items
@param  Blueprint|null $blueprint
@return Medium
Create Medium from array of parameters