- Timestamp:
- 07/09/12 14:44:20 (13 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/importExport/inc/class.dc.ieModule.php
r270 r840 2 2 # -- BEGIN LICENSE BLOCK --------------------------------------- 3 3 # 4 # This file is part of Dotclear2.4 # This file is part of importExport, a plugin for DotClear2. 5 5 # 6 # Copyright (c) 2003-201 1Olivier Meunier & Association Dotclear6 # Copyright (c) 2003-2012 Olivier Meunier & Association Dotclear 7 7 # Licensed under the GPL version 2.0 license. 8 8 # See LICENSE file or … … 12 12 if (!defined('DC_RC_PATH')) { return; } 13 13 14 class dcIeModule14 abstract class dcIeModule 15 15 { 16 16 public $type; … … 28 28 $this->setInfo(); 29 29 30 $this->id = get_class($this); 31 if (!$this->type) { 32 throw new Exception('No type for module'.$this->id); 30 if (!in_array($this->type,array('import','export'))) { 31 throw new Exception(sprintf('Unknow type for module %s',get_class($this))); 33 32 } 34 35 $this->url = 'plugin.php?p=importExport&t='.$this->type.'&f='.$this->id;36 33 37 34 if (!$this->name) { 38 35 $this->name = get_class($this); 39 36 } 37 38 $this->id = get_class($this); 39 $this->url = sprintf('plugin.php?p=importExport&type=%s&module=%s',$this->type,$this->id); 40 40 } 41 41 … … 44 44 } 45 45 46 protected function setInfo() 47 { 48 } 46 abstract protected function setInfo(); 49 47 50 48 final public function getURL($escape=false) 51 49 { 52 if ($escape) { 53 return html::escapeHTML($this->url); 54 } 55 return $this->url; 50 return $escape ? html::escapeHTML($this->url) : $this->url; 56 51 } 57 52 58 public function process($do) 59 { 60 } 53 abstract public function process($do); 61 54 62 public function gui() 63 { 64 } 55 abstract public function gui(); 65 56 66 57 protected function progressBar($percent)
Note: See TracChangeset
for help on using the changeset viewer.