/** * Mainline for export processing * * @param int $targetstarttime The timestamp representing the theoretical * time when this task was meant to be run * @param int $lastruntime The last time the export was run * (required for incremental scheduled export) * @param int $maxruntime The max time in seconds to complete export * default: 0 => unlimited * @param object $state Previous ran state data to continue from * (currently not used for export) * @return mixed object Current state of export processing * or null on success! * ->result false on error, i.e. time limit exceeded. */ public function run($targetstarttime = 0, $lastruntime = 0, $maxruntime = 0, $state = null) { $result = parent::run($targetstarttime, $lastruntime, $maxruntime, $state); if (!defined('PHPUnit_MAIN_METHOD')) { // Not in a unit test, so send out log files in a zip. $logids = $this->dblogger->get_log_ids(); rlip_send_log_emails('dhexport_version1elis', $logids, $this->manual); } return $result; }
/** * Default export plugin constructor * * @param object $fileplugin the file plugin used for output * @param array $data the fixed data to include in the export */ public function __construct($fileplugin, $data) { parent::__construct($fileplugin); $this->index = 0; $this->data = $data; }