]> git.wh0rd.org Git - tt-rss.git/commitdiff
classes/Plugin: remove dbh & host fields; set init() and about() as abstract methods.
authorAndrew Dolgov <noreply@fakecake.org>
Tue, 23 May 2017 18:16:30 +0000 (21:16 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Tue, 23 May 2017 18:16:30 +0000 (21:16 +0300)
classes/plugin.php

index 5939d51c0c61345771ae8ca5e1cd5f31a1a9c612..fcf329ca10c2b356a8628d8ee42ae2e8785dc40d 100644 (file)
@@ -1,19 +1,11 @@
 <?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;
-       }
+       abstract function init($host);
 
-       function about() {
-               // version, name, description, author, is_system
-               return array(1.0, "plugin", "No description", "No author", false);
-       }
+       abstract function about();
+       // return array(1.0, "plugin", "No description", "No author", false);
 
        function flags() {
                /* associative array, possible keys: