ImportPlugin.class.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Abstract class for the import plugins
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. if (! defined('PHPMYADMIN')) {
  9. exit;
  10. }
  11. /* This class extends the PluginObserver class */
  12. require_once 'PluginObserver.class.php';
  13. /**
  14. * Provides a common interface that will have to be implemented by all of the
  15. * import plugins.
  16. *
  17. * @package PhpMyAdmin
  18. */
  19. abstract class ImportPlugin extends PluginObserver
  20. {
  21. /**
  22. * Array containing the import plugin properties
  23. *
  24. * @var type array
  25. */
  26. protected $properties;
  27. /**
  28. * Handles the whole import logic
  29. *
  30. * @return void
  31. */
  32. abstract public function doImport();
  33. /* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
  34. /**
  35. * Gets the import specific format plugin properties
  36. *
  37. * @return array
  38. */
  39. public function getProperties()
  40. {
  41. return $this->properties;
  42. }
  43. /**
  44. * Sets the export plugins properties and is implemented by each import
  45. * plugin
  46. *
  47. * @return void
  48. */
  49. abstract protected function setProperties();
  50. }
  51. ?>