public function resolveImageType($key = null)
    {
        switch ($key) {
            case 'poster':
            case 'posters':
            case 'poster_path':
                $object = new Image\PosterImage();
                break;

            case 'backdrop':
            case 'backdrops':
            case 'backdrop_path':
                $object = new Image\BackdropImage();
                break;

            case 'profile':
            case 'profiles':
            case 'profile_path':
                $object = new Image\ProfileImage();
                break;

            case 'logo':
            case 'logos':
            case 'logo_path':
                $object = new Image\LogoImage();
                break;

            case 'still':
            case 'stills':
            case 'still_path':
                $object = new Image\StillImage();
                break;

            case 'file_path':
            default:
                $object = new Image();
                break;
        }

        return $object;
    }
public function resolveImageType($key = null)
    {
        switch ($key) {
            case 'poster':
            case 'posters':
            case 'poster_path':
                $object = new Image\PosterImage();
                break;

            case 'backdrop':
            case 'backdrops':
            case 'backdrop_path':
                $object = new Image\BackdropImage();
                break;

            case 'profile':
            case 'profiles':
            case 'profile_path':
                $object = new Image\ProfileImage();
                break;

            case 'logo':
            case 'logos':
            case 'logo_path':
                $object = new Image\LogoImage();
                break;

            case 'still':
            case 'stills':
            case 'still_path':
                $object = new Image\StillImage();
                break;

            case 'file_path':
            default:
                $object = new Image();
                break;
        }

        return $object;
    }
public function resolveImageType ( $ key = null ) { switch ( $ key ) { case 'poster' : case 'posters' : case 'poster_path' : $ object = new Image \ PosterImage ( ) ; break ; case 'backdrop' : case 'backdrops' : case 'backdrop_path' : $ object = new Image \ BackdropImage ( ) ; break ; case 'profile' : case 'profiles' : case 'profile_path' : $ object = new Image \ ProfileImage ( ) ; break ; case 'logo' : case 'logos' : case 'logo_path' : $ object = new Image \ LogoImage ( ) ; break ; case 'still' : case 'stills' : case 'still_path' : $ object = new Image \ StillImage ( ) ; break ; case 'file_path' : default : $ object = new Image ( ) ; break ; } return $ object ; }
Helper function to obtain a new object for an image type

@param  string|null                                                                                     $key
@return Image|Image\BackdropImage|Image\LogoImage|Image\PosterImage|Image\ProfileImage|Image\StillImage
Helper function to obtain a new object for an image type