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