<?php
class PluginHost {
- private $dbh;
private $pdo;
private $hooks = array();
private $plugins = array();
const HOOK_FORMAT_ARTICLE_CDM = 35;
const HOOK_FEED_BASIC_INFO = 36;
const HOOK_SEND_LOCAL_FILE = 37;
+ const HOOK_UNSUBSCRIBE_FEED = 38;
const KIND_ALL = 1;
const KIND_SYSTEM = 2;
const KIND_USER = 3;
function __construct() {
- $this->dbh = Db::get();
$this->pdo = Db::pdo();
$this->storage = array();
}
function get_dbh() {
- return $this->dbh;
+ return Db::get();
}
function get_pdo() {
} else {
return false;
}
-
- return false;
}
function get_commands() {
function get_all($sender) {
$idx = get_class($sender);
- return $this->storage[$idx];
+ $data = $this->storage[$idx];
+
+ return $data ? $data : [];
}
function clear_data($sender) {