diff --git a/application/core/plugin.php b/application/core/plugin.php index a3246597..6e7d10bc 100644 --- a/application/core/plugin.php +++ b/application/core/plugin.php @@ -30,28 +30,36 @@ abstract class Plugin { * * @return string */ - public abstract function getAuthor(); + public function getAuthor() { + return $this->author; + } /** * Get plugin version * * @return float */ - public abstract function getVersion(); + public abstract function getVersion() { + return $this->version; + } /** * Get plugin name * * @return string */ - public abstract function getName(); + public abstract function getName() { + return $this->name; + } /** * Get plugin description * * @return string */ - public abstract function getDescription(); + public abstract function getDescription() { + return $this->description; + } } ?> diff --git a/application/plugins/testPlugin.php b/application/plugins/testPlugin.php index 3d5c50ca..622d409e 100644 --- a/application/plugins/testPlugin.php +++ b/application/plugins/testPlugin.php @@ -3,33 +3,14 @@ namespace ManiaControl; class TestPlugin extends Plugin { - const AUTHOR = 'steeffeen'; - const NAME = 'Test Plugin'; - const VERSION = '1.0'; - const DESCRIPTION = 'Test Plugin'; public function __construct(ManiaControl $maniaControl) { $this->maniaControl = $maniaControl; - } - - - - - //abstract Methods from ParentClass (do not change them!) - public function getAuthor() { - return self::AUTHOR; - } - - public function getName() { - return self::NAME; - } - - public function getVersion() { - return self::VERSION; - } - - public function getDescription() { - return self::DESCRIPTION; + + $this->author = 'steeffeen'; + $this->name = 'Test Plugin'; + $this->version = '1.0'; + $this->description = 'Dummy plugin for testing plugin handling'; } }