plugin.php 693 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. abstract class Plugin {
  3. const API_VERSION_COMPAT = 1;
  4. /** @var PDO */
  5. protected $pdo;
  6. /* @var PluginHost $host */
  7. abstract function init($host);
  8. abstract function about();
  9. // return array(1.0, "plugin", "No description", "No author", false);
  10. function __construct() {
  11. $this->pdo = Db::pdo();
  12. }
  13. function flags() {
  14. /* associative array, possible keys:
  15. needs_curl = boolean
  16. */
  17. return array();
  18. }
  19. /**
  20. * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  21. */
  22. function is_public_method($method) {
  23. return false;
  24. }
  25. function get_js() {
  26. return "";
  27. }
  28. function get_prefs_js() {
  29. return "";
  30. }
  31. function api_version() {
  32. return Plugin::API_VERSION_COMPAT;
  33. }
  34. }