. * * @package moodle * @subpackage portfolio * @author Penny Leach * @license http://www.gnu.org/copyleft/gpl.html GNU GPL * @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com * * This file contains all the class definitions of the export formats. * They are implemented in php classes rather than just a simpler hash * Because it provides an easy way to do subtyping using php inheritance. */ /** * the most basic type - pretty much everything is a subtype */ class portfolio_format_file { public static function mimetypes() { return array(null); } } /** * image format, subtype of file. */ class portfolio_format_image extends portfolio_format_file { public static function mimetypes() { return mimeinfo_from_icon('type', 'image.gif', true); } } /** * html format - could be used for an external cms or something * * in case we want to be really specific. */ class portfolio_format_html extends portfolio_format_file { public static function mimetypes() { return array('text/html'); } } /** * video format, subtype of file. * * I guess there could be a youtube/google video plugin * and anyway, the flickr plugin can support it already */ class portfolio_format_video extends portfolio_format_file { public static function mimetypes() { return array_merge( mimeinfo_from_icon('type', 'video.gif', true), mimeinfo_from_icon('type', 'avi.gif', true) ); } } /** * class for plain text format.. not sure why we would need this yet * but since resource module wants to export it... we can */ class portfolio_format_text extends portfolio_format_file { public static function mimetypes() { return array('text/plain'); } } /** * later.... a moodle plugin might support this. * it's commented out in portfolio_supported_formats so cannot currently be used. */ class portfolio_format_mbkp extends portfolio_format_file {} ?>