* */ class taoQtiCommon_helpers_PciJsonMarshaller extends Marshaller { /** * An arbitrary QTI File Datatype MIME type. * * @var integer */ const FILE_PLACEHOLDER_MIMETYPE = 'qti+application/octet-stream'; /** * An arbitrary QTI File Content placeholder. * * @var integer */ const FILE_PLACEHOLDER_DATA = 'qti_file_datatype_placeholder_data'; /** * Create a new PciJsonMarshaller object. * */ protected function construct() { parent::__construct(); } /** * Marshall a file into a JSON placeholder. * * @param File $file * @return array */ protected function marshallFile(QtiFile $file) { return array('base' => array('file' => array('mime' => self::FILE_PLACEHOLDER_MIMETYPE, 'data' => base64_encode(self::FILE_PLACEHOLDER_DATA)))); } }