]> git.wh0rd.org - tt-rss.git/blobdiff - classes/plugin.php
auth_internal: use PDO + other fixes
[tt-rss.git] / classes / plugin.php
index 09204098bb411314157dd71c7b38bb9f80e1a979..fb4e08fb15d7f1a924e07d03b03d10901faa5e4a 100644 (file)
@@ -1,19 +1,14 @@
 <?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;
 
-       function about() {
-               // version, name, description, author, is_system
-               return array(1.0, "plugin", "No description", "No author", false);
-       }
+       abstract function init($host);
+
+       abstract function about();
+       // return array(1.0, "plugin", "No description", "No author", false);
 
        function flags() {
                /* associative array, possible keys:
@@ -22,6 +17,9 @@ class Plugin {
                return array();
        }
 
+       /**
+        * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+        */
        function is_public_method($method) {
                return false;
        }
@@ -37,5 +35,4 @@ class Plugin {
        function api_version() {
                return Plugin::API_VERSION_COMPAT;
        }
-}
-?>
+}
\ No newline at end of file