public function renderMedia(MediaInterface $media, array $params = [])
    {
        switch ($media->getType()) {
            case MediaTypes::VIDEO :
                return $this->renderVideo($media, $params);
            case MediaTypes::FLASH :
                return $this->renderFlash($media, $params);
            case MediaTypes::AUDIO :
                return $this->renderAudio($media, $params);
            case MediaTypes::IMAGE :
                return $this->renderImage($media, $params);
            default:
                return $this->renderFile($media, $params);
        }
    }
public function renderMedia(MediaInterface $media, array $params = [])
    {
        switch ($media->getType()) {
            case MediaTypes::VIDEO :
                return $this->renderVideo($media, $params);
            case MediaTypes::FLASH :
                return $this->renderFlash($media, $params);
            case MediaTypes::AUDIO :
                return $this->renderAudio($media, $params);
            case MediaTypes::IMAGE :
                return $this->renderImage($media, $params);
            default:
                return $this->renderFile($media, $params);
        }
    }
public function renderMedia ( MediaInterface $ media , array $ params = [ ] ) { switch ( $ media -> getType ( ) ) { case MediaTypes :: VIDEO : return $ this -> renderVideo ( $ media , $ params ) ; case MediaTypes :: FLASH : return $ this -> renderFlash ( $ media , $ params ) ; case MediaTypes :: AUDIO : return $ this -> renderAudio ( $ media , $ params ) ; case MediaTypes :: IMAGE : return $ this -> renderImage ( $ media , $ params ) ; default : return $ this -> renderFile ( $ media , $ params ) ; } }
Renders the media.

@param MediaInterface $media
@param array          $params
@return string
@throws \InvalidArgumentException
Renders the media .