2006-11-10 16:30:01 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* eGroupWare
|
|
|
|
*
|
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
|
|
|
* @package importexport
|
|
|
|
* @link http://www.egroupware.org
|
|
|
|
* @author Cornelius Weiss <nelius@cwtech.de>
|
|
|
|
* @copyright Cornelius Weiss <nelius@cwtech.de>
|
2006-11-10 16:38:31 +01:00
|
|
|
* @version $Id$
|
2006-11-10 16:30:01 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* class iface_export_plugin
|
|
|
|
* This a the abstract interface for an export plugin of importexport
|
|
|
|
*
|
|
|
|
* You need to implement this class in
|
2007-06-08 00:08:38 +02:00
|
|
|
* EGW_INCLUDE_ROOT/appname/inc/importexport/class.export_<type>.inc.php
|
2006-11-10 16:30:01 +01:00
|
|
|
* to attend the importexport framwork with your export.
|
|
|
|
*
|
|
|
|
* NOTE: This is an easy interface, cause plugins live in theire own
|
2006-11-16 12:04:09 +01:00
|
|
|
* space. Means that they are responsible for generating a defintion AND
|
2006-11-10 16:30:01 +01:00
|
|
|
* working on that definition.
|
|
|
|
* So this interface just garanties the interaction with userinterfaces. It
|
|
|
|
* has nothing to do with datatypes.
|
|
|
|
*
|
|
|
|
* JS:
|
|
|
|
* required function in opener:
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* // returns array of identifiers
|
|
|
|
* // NOTE: identifiers need to b
|
|
|
|
* get_selection();
|
|
|
|
*
|
|
|
|
* get_selector(); //returns array
|
|
|
|
*/
|
|
|
|
interface iface_export_plugin {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* exports entries according to given definition object.
|
|
|
|
*
|
2007-06-09 17:36:30 +02:00
|
|
|
* @param stream $_stream
|
2006-11-10 16:30:01 +01:00
|
|
|
* @param definition $_definition
|
|
|
|
*/
|
2007-06-09 17:36:30 +02:00
|
|
|
public function export($_stream, definition $_definition);
|
2006-11-10 16:30:01 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* returns translated name of plugin
|
|
|
|
*
|
|
|
|
* @return string name
|
|
|
|
*/
|
|
|
|
public static function get_name();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* returns translated (user) description of plugin
|
|
|
|
*
|
|
|
|
* @return string descriprion
|
|
|
|
*/
|
|
|
|
public static function get_description();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* retruns file suffix for exported file (e.g. csv)
|
|
|
|
*
|
|
|
|
* @return string suffix
|
|
|
|
*/
|
|
|
|
public static function get_filesuffix();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* return etemplate components for options.
|
|
|
|
* @abstract We can't deal with etemplate objects here, as an uietemplate
|
|
|
|
* objects itself are scipt orientated and not "dialog objects"
|
|
|
|
*
|
|
|
|
* @return array (
|
|
|
|
* name => string,
|
|
|
|
* content => array,
|
|
|
|
* sel_options => array,
|
|
|
|
* preserv => array,
|
|
|
|
* )
|
|
|
|
*/
|
2007-06-09 17:36:30 +02:00
|
|
|
public function get_options_etpl();
|
2006-11-10 16:30:01 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* returns etemplate name for slectors of this plugin
|
|
|
|
*
|
|
|
|
* @return string etemplate name
|
|
|
|
*/
|
2007-06-09 17:36:30 +02:00
|
|
|
public function get_selectors_etpl();
|
2006-11-10 16:30:01 +01:00
|
|
|
|
|
|
|
} // end of iface_export_plugin
|
|
|
|
?>
|