src/Storage/File/StorableFileFactory.php
protected function interpretFromRawContent(RawContentInterface $data, $name, $mimeType)
    {
        switch ($this->interpreter->interpret($data)) {

            case ContentTypes::URI:
                return $this->makeFromUrl($data->content(), $name, $mimeType);

            case ContentTypes::DATAURI:
                return $this->makeFromDataUri($data, $name, $mimeType);

            case ContentTypes::RAW:
            default:
                return $this->makeFromRawData($data, $name, $mimeType);
        }
    }
protected function interpretFromRawContent(RawContentInterface $data, $name, $mimeType)
    {
        switch ($this->interpreter->interpret($data)) {

            case ContentTypes::URI:
                return $this->makeFromUrl($data->content(), $name, $mimeType);

            case ContentTypes::DATAURI:
                return $this->makeFromDataUri($data, $name, $mimeType);

            case ContentTypes::RAW:
            default:
                return $this->makeFromRawData($data, $name, $mimeType);
        }
    }
protected function interpretFromRawContent ( RawContentInterface $ data , $ name , $ mimeType ) { switch ( $ this -> interpreter -> interpret ( $ data ) ) { case ContentTypes :: URI : return $ this -> makeFromUrl ( $ data -> content ( ) , $ name , $ mimeType ) ; case ContentTypes :: DATAURI : return $ this -> makeFromDataUri ( $ data , $ name , $ mimeType ) ; case ContentTypes :: RAW : default : return $ this -> makeFromRawData ( $ data , $ name , $ mimeType ) ; } }
Interprets given raw content as a storable file.

@param RawContentInterface $data
@param string|null         $name
@param string|null         $mimeType
@return StorableFileInterface
@throws CouldNotReadDataException
@throws CouldNotRetrieveRemoteFileException
Interprets given raw content as a storable file .