BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mass_user_torrents_editor.class.php 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /**
  3. * Abstract class
  4. * Mass User-Torrents Editor
  5. *
  6. * A class that deals with mass editing a user's torrents.
  7. *
  8. * This abstract class is used by sub-classes as a way to access the Cache/DB.
  9. *
  10. * It is intended to streamline the process of processing data sent by the
  11. * MASS_USER_TORRENT_TABLE_VIEW class.
  12. *
  13. * It could also be used for other types like collages.
  14. */
  15. abstract class MASS_USER_TORRENTS_EDITOR
  16. {
  17. /**
  18. * The affected DB table
  19. * @var string $Table
  20. */
  21. protected $Table;
  22. /**
  23. * Set the Table
  24. * @param string $Table
  25. */
  26. final public function set_table($Table)
  27. {
  28. $this->Table = db_string($Table);
  29. }
  30. /**
  31. * Get the Table
  32. * @return string $Table
  33. */
  34. final public function get_table()
  35. {
  36. return $this->Table;
  37. }
  38. /**
  39. * The extending class must provide a method to send a query and clear the cache
  40. */
  41. abstract protected function query_and_clear_cache($sql);
  42. /**
  43. * A method to insert many rows into a single table
  44. * Not required in subsequent classes
  45. */
  46. public function mass_add()
  47. {
  48. }
  49. /**
  50. * A method to remove many rows from a table
  51. * The extending class must have a mass_remove method
  52. */
  53. abstract public function mass_remove();
  54. /**
  55. * A method to update many rows in a table
  56. * The extending class must have a mass_update method
  57. */
  58. abstract public function mass_update();
  59. }