src/Phlexible/Component/MediaExtractor/Transmutor.php
public function transmute(InputDescriptor $input, $targetFormat)
    {
        if (!in_array($targetFormat, array('image', 'audio', 'video', 'flash', 'text'))) {
            return null;
        }

        $mediaType = $this->mediaTypeManager->find($input->getMediaType());

        return $this->extractor->extract($input, $mediaType, $targetFormat);
    }
public function transmute(InputDescriptor $input, $targetFormat)
    {
        if (!in_array($targetFormat, array('image', 'audio', 'video', 'flash', 'text'))) {
            return null;
        }

        $mediaType = $this->mediaTypeManager->find($input->getMediaType());

        return $this->extractor->extract($input, $mediaType, $targetFormat);
    }
public function transmute ( InputDescriptor $ input , $ targetFormat ) { if ( ! in_array ( $ targetFormat , array ( 'image' , 'audio' , 'video' , 'flash' , 'text' ) ) ) { return null ; } $ mediaType = $ this -> mediaTypeManager -> find ( $ input -> getMediaType ( ) ) ; return $ this -> extractor -> extract ( $ input , $ mediaType , $ targetFormat ) ; }
Transmute file to target format.

@param InputDescriptor $input
@param string          $targetFormat

@return string
Transmute file to target format .