summaryrefslogtreecommitdiff
path: root/src/lib/Plugin.class.php
blob: 8c7fad84de13527f92fc2cea83ccf04575aa16c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

abstract class Plugin {
	protected $config = Array();
	
	public abstract static function configList();
	public abstract static function description();
	
	public function configSet($param, $value) {
		if (isset($this->config[$param])) {
			$this->config[$param]=$value;
		}
	}

	public function userConfig() { return array(); }
	protected function addConfigGroup($arr, $group) {
		if (!isset($arr[$group]))
			$arr[$group] = array();
	}
	
	public abstract function init();
}