core = &$core; $this->setInfo(); if (!in_array($this->type, array('import', 'export'))) { throw new Exception(sprintf('Unknow type for module %s', get_class($this))); } if (!$this->name) { $this->name = get_class($this); } $this->id = get_class($this); $this->url = sprintf('plugin.php?p=importExport&type=%s&module=%s', $this->type, $this->id); } public function init() { } abstract protected function setInfo(); final public function getURL($escape = false) { return $escape ? html::escapeHTML($this->url) : $this->url; } abstract public function process($do); abstract public function gui(); protected function progressBar($percent) { $percent = ceil($percent); if ($percent > 100) { $percent = 100; } return '
' . __('Your blog has been successfully imported. Welcome on Dotclear 2!') . '
' . '