Changed Plugin Class to Interface! (Final)

-> static methods for Name, Version, Author, Description
This commit is contained in:
Steffen Schröder
2013-12-03 22:21:17 +01:00
parent 35a7232894
commit 6c247f0519
8 changed files with 247 additions and 63 deletions

View File

@@ -20,11 +20,11 @@ use FML\Controls\Labels\Label_Text;
*
* @author steeffeen
*/
class LocalRecordsPlugin extends Plugin implements CallbackListener {
class LocalRecordsPlugin implements CallbackListener, Plugin {
/**
* Constants
*/
const VERSION = '1.0';
const VERSION = 1.0;
const MLID_RECORDS = 'ml_local_records';
const TABLE_RECORDS = 'mc_localrecords';
const SETTING_WIDGET_TITLE = 'Widget Title';
@@ -84,6 +84,38 @@ class LocalRecordsPlugin extends Plugin implements CallbackListener {
}
}
/**
*
* @see \ManiaControl\Plugins\Plugin::getName()
*/
public static function getName() {
return 'Local Records Plugin';
}
/**
*
* @see \ManiaControl\Plugins\Plugin::getVersion()
*/
public static function getVersion() {
return self::VERSION;
}
/**
*
* @see \ManiaControl\Plugins\Plugin::getAuthor()
*/
public static function getAuthor() {
return 'steeffeen';
}
/**
*
* @see \ManiaControl\Plugins\Plugin::getDescription()
*/
public static function getDescription() {
return 'Plugin offering tracking of local records and manialinks to display them.';
}
/**
* Handle ManiaControl init
*