Differences Between: [Versions 311 and 402] [Versions 311 and 403]
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.
Copyright: | 2008 Penny Leach <penny@catalyst.net.nz>, |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 607 lines (19 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
portfolio_format:: (5 methods):
mimetypes()
get_file_directory()
file_output()
make_tag()
conflicts()
portfolio_format_file:: (3 methods):
mimetypes()
get_file_directory()
file_output()
portfolio_format_image:: (2 methods):
mimetypes()
conflicts()
portfolio_format_plainhtml:: (2 methods):
mimetypes()
conflicts()
portfolio_format_video:: (1 method):
mimetypes()
portfolio_format_text:: (2 methods):
mimetypes()
conflicts()
portfolio_format_rich:: (1 method):
mimetypes()
portfolio_format_richhtml:: (3 methods):
get_file_directory()
file_output()
conflicts()
portfolio_format_leap2a:: (5 methods):
get_file_directory()
file_id_prefix()
file_output()
leap2a_writer()
manifest_name()
portfolio_format_pdf:: (1 method):
mimetypes()
portfolio_format_document:: (1 method):
mimetypes()
portfolio_format_spreadsheet:: (1 method):
mimetypes()
portfolio_format_presentation:: (1 method):
mimetypes()
Class: portfolio_format - X-Ref
Base class to inherit from.mimetypes() X-Ref |
Array of mimetypes this format supports |
get_file_directory() X-Ref |
For multipart formats, eg html with attachments, we need to have a directory to place associated files from inside the zip file. This is the name of that directory |
file_output($file, $options=null) X-Ref |
Given a file, return a snippet of markup in whatever format to link to that file. Usually involves the path given by get_file_directory. This is not supported in subclasses of portfolio_format_file since they're all just single files. param: stored_file $file file information object param: array $options array of options to pass. can contain: |
make_tag($file, $path, $attributes) X-Ref |
Create portfolio tag param: stored_file $file file information object param: string $path file path param: array $attributes portfolio attributes return: string |
conflicts($format) X-Ref |
Whether this format conflicts with the given format. This is used for the case where an export location "generally" supports something like FORMAT_PLAINHTML but then in a specific export case, must add attachments, which means that FORMAT_RICHHTML is supported in that case, which implies removing support for FORMAT_PLAINHTML. Note that conflicts don't have to be bi-directional (eg FORMAT_PLAINHTML conflicts with FORMAT_RICHHTML but not the other way around) and things within the class hierarchy are resolved automatically anyway. This is really just between subclasses of format_rich and subclasses of format_file. param: string $format one of the FORMAT_XX constants return: bool |
Class: portfolio_format_file - X-Ref
The most basic type - pretty much everything is a subtypemimetypes() X-Ref |
Array of mimetypes this format supports return: array |
get_file_directory() X-Ref |
For multipart formats, eg html with attachments, we need to have a directory to place associated files from inside the zip file. This is the name of that directory return: bool |
file_output($file, $options=null) X-Ref |
Given a file, return a snippet of markup in whatever format to link to that file. Usually involves the path given by get_file_directory. This is not supported in subclasses of portfolio_format_file since they're all just single files. param: stored_file $file informations object param: array $options array of options to pass. can contain: |
Class: portfolio_format_image - X-Ref
Image format, subtype of file.mimetypes() X-Ref |
Return all mimetypes that use image.gif (eg all images) return: string |
conflicts($format) X-Ref |
Whether this format conflicts with the given format. This is used for the case where an export location "generally" supports something like FORMAT_PLAINHTML but then in a specific export case, must add attachments, which means that FORMAT_RICHHTML is supported in that case, which implies removing support for FORMAT_PLAINHTML. Note that conflicts don't have to be bi-directional (eg FORMAT_PLAINHTML conflicts with FORMAT_RICHHTML but not the other way around) and things within the class hierarchy are resolved automatically anyway. This is really just between subclasses of format_rich and subclasses of format_file. param: string $format one of the FORMAT_XX constants return: bool |
Class: portfolio_format_plainhtml - X-Ref
HTML formatmimetypes() X-Ref |
Return html mimetype return: array |
conflicts($format) X-Ref |
Whether this format conflicts with the given format. This is used for the case where an export location "generally" supports something like FORMAT_PLAINHTML but then in a specific export case, must add attachments, which means that FORMAT_RICHHTML is supported in that case, which implies removing support for FORMAT_PLAINHTML. Note that conflicts don't have to be bi-directional (eg FORMAT_PLAINHTML conflicts with FORMAT_RICHHTML but not the other way around) and things within the class hierarchy are resolved automatically anyway. This is really just between subclasses of format_rich and subclasses of format_file. param: string $format one of the FORMAT_XX constants return: bool |
Class: portfolio_format_video - X-Ref
Video formatClass: portfolio_format_text - X-Ref
Class for plain text format.mimetypes() X-Ref |
Return plain text mimetypes return: array |
conflicts($format ) X-Ref |
Whether this format conflicts with the given format. This is used for the case where an export location "generally" supports something like FORMAT_PLAINHTML but then in a specific export case, must add attachments, which means that FORMAT_RICHHTML is supported in that case, which implies removing support for FORMAT_PLAINHTML. Note that conflicts don't have to be bi-directional (eg FORMAT_PLAINHTML conflicts with FORMAT_RICHHTML but not the other way around) and things within the class hierarchy are resolved automatically anyway. This is really just between subclasses of format_rich and subclasses of format_file. param: string $format one of the FORMAT_XX constants return: bool |
Class: portfolio_format_rich - X-Ref
Base class for rich formats.Class: portfolio_format_richhtml - X-Ref
Richhtml - html with attachments.get_file_directory() X-Ref |
For multipart formats, eg html with attachments, we need to have a directory to place associated files from inside the zip file. this is the name of that directory return: string |
file_output($file, $options=null) X-Ref |
Given a file, return a snippet of markup in whatever format to link to that file. Usually involves the path given by get_file_directory. This is not supported in subclasses of portfolio_format_file since they're all just single files. param: stored_file $file information for existing file param: array $options array of options to pass. can contain: return: string |
conflicts($format) X-Ref |
Whether this format conflicts with the given format. This is used for the case where an export location "generally" supports something like FORMAT_PLAINHTML but then in a specific export case, must add attachments, which means that FORMAT_RICHHTML is supported in that case, which implies removing support for FORMAT_PLAINHTML. Note that conflicts don't have to be bi-directional (eg FORMAT_PLAINHTML conflicts with FORMAT_RICHHTML but not the other way around) and things within the class hierarchy are resolved automatically anyway. This is really just between subclasses of format_rich and subclasses of format_file. param: string $format one of the FORMAT_XX constants return: bool |
Class: portfolio_format_leap2a - X-Ref
Class used for leap2a formatget_file_directory() X-Ref |
For multipart formats, eg html with attachments, we need to have a directory to place associated files from inside the zip file. this is the name of that directory return: string |
file_id_prefix() X-Ref |
Return the file prefix return: string |
file_output($file, $options=null) X-Ref |
Return the link to a file param: stored_file $file information for existing file param: array $options array of options to pass. can contain: return: string |
leap2a_writer(stdclass $user=null) X-Ref |
Generate portfolio_format_leap2a param: stdclass $user user information object return: portfolio_format_leap2a_writer |
manifest_name() X-Ref |
Return the manifest name return: string |
Class: portfolio_format_pdf - X-Ref
'PDF format', subtype of file.Class: portfolio_format_document - X-Ref
'Document format', subtype of file.Class: portfolio_format_spreadsheet - X-Ref
'Spreadsheet format', subtype of file.Class: portfolio_format_presentation - X-Ref
'Presentation format', subtype of file.