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