protected function marshallFile(QtiFile $file)
    {
        $data = array('base' => array('file' => array('mime' => $file->getMimeType(), 'data' => base64_encode($file->getData()))));

        if ($file->hasFilename() === true) {
            $data['base']['file']['name'] = $file->getFilename();
        }

        return $data;
    }
protected function marshallFile(QtiFile $file)
    {
        $data = array('base' => array('file' => array('mime' => $file->getMimeType(), 'data' => base64_encode($file->getData()))));

        if ($file->hasFilename() === true) {
            $data['base']['file']['name'] = $file->getFilename();
        }

        return $data;
    }
protected function marshallFile ( QtiFile $ file ) { $ data = array ( 'base' => array ( 'file' => array ( 'mime' => $ file -> getMimeType ( ) , 'data' => base64_encode ( $ file -> getData ( ) ) ) ) ) ; if ( $ file -> hasFilename ( ) === true ) { $ data [ 'base' ] [ 'file' ] [ 'name' ] = $ file -> getFilename ( ) ; } return $ data ; }
Marshall a QTI file datatype into its PCI JSON Representation.

@param \qtism\common\datatypes\File $file
@return array
Marshall a QTI file datatype into its PCI JSON Representation .