<?php
-class Plugin {
- private $dbh;
- private $host;
-
+abstract class Plugin {
const API_VERSION_COMPAT = 1;
- function init($host) {
- $this->dbh = $host->get_dbh();
- $this->host = $host;
+ /** @var PDO */
+ protected $pdo;
+
+ /* @var PluginHost $host */
+ abstract function init($host);
+
+ abstract function about();
+ // return array(1.0, "plugin", "No description", "No author", false);
+
+ function __construct() {
+ $this->pdo = Db::pdo();
+ }
+
+ function flags() {
+ /* associative array, possible keys:
+ needs_curl = boolean
+ */
+ return array();
}
- function about() {
- // version, name, description, author, is_system
- return array(1.0, "plugin", "No description", "No author", false);
+ /**
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ */
+ function is_public_method($method) {
+ return false;
}
function get_js() {
function api_version() {
return Plugin::API_VERSION_COMPAT;
}
-}
-?>
+}
\ No newline at end of file