2013-11-09 11:06:04 +01:00
|
|
|
<?php
|
|
|
|
|
2013-11-12 15:48:25 +01:00
|
|
|
namespace ManiaControl\Plugins;
|
|
|
|
|
|
|
|
use ManiaControl\ManiaControl;
|
2013-11-09 11:06:04 +01:00
|
|
|
|
|
|
|
/**
|
2013-11-10 02:55:08 +01:00
|
|
|
* Plugin parent class
|
2013-11-09 11:06:04 +01:00
|
|
|
*
|
2013-11-12 15:48:25 +01:00
|
|
|
* @author steeffeen & kremsy
|
2013-11-09 11:06:04 +01:00
|
|
|
*/
|
2013-11-10 02:55:08 +01:00
|
|
|
abstract class Plugin {
|
|
|
|
|
2013-11-09 12:15:02 +01:00
|
|
|
/**
|
2013-11-10 02:55:08 +01:00
|
|
|
* Private properties
|
|
|
|
*/
|
2013-11-12 15:48:25 +01:00
|
|
|
protected $maniaControl = null;
|
|
|
|
protected $name = 'undefined';
|
|
|
|
protected $version = 'undefined';
|
|
|
|
protected $author = 'undefined';
|
|
|
|
protected $description = 'undefined';
|
2013-11-09 12:15:02 +01:00
|
|
|
|
|
|
|
/**
|
2013-11-12 15:48:25 +01:00
|
|
|
* Create a new plugin
|
2013-11-09 12:15:02 +01:00
|
|
|
*
|
2013-11-12 15:48:25 +01:00
|
|
|
* @param \ManiaControl\ManiaControl $maniaControl
|
2013-11-09 12:15:02 +01:00
|
|
|
*/
|
2013-11-10 02:55:08 +01:00
|
|
|
public abstract function __construct(ManiaControl $maniaControl);
|
2013-11-09 12:15:02 +01:00
|
|
|
|
2013-11-12 19:33:25 +01:00
|
|
|
/**
|
|
|
|
* Get class name as string
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public static function getClass() {
|
|
|
|
return __CLASS__;
|
|
|
|
}
|
|
|
|
|
2013-11-10 02:55:08 +01:00
|
|
|
/**
|
|
|
|
* Get plugin author
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2013-11-10 11:49:32 +01:00
|
|
|
public function getAuthor() {
|
|
|
|
return $this->author;
|
|
|
|
}
|
2013-11-09 12:15:02 +01:00
|
|
|
|
2013-11-10 02:55:08 +01:00
|
|
|
/**
|
|
|
|
* Get plugin version
|
|
|
|
*
|
|
|
|
* @return float
|
|
|
|
*/
|
2013-11-10 12:00:47 +01:00
|
|
|
public function getVersion() {
|
2013-11-10 11:49:32 +01:00
|
|
|
return $this->version;
|
|
|
|
}
|
2013-11-09 19:26:57 +01:00
|
|
|
|
2013-11-10 02:55:08 +01:00
|
|
|
/**
|
|
|
|
* Get plugin name
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2013-11-10 12:00:47 +01:00
|
|
|
public function getName() {
|
2013-11-10 11:49:32 +01:00
|
|
|
return $this->name;
|
|
|
|
}
|
2013-11-09 19:26:57 +01:00
|
|
|
|
2013-11-10 02:55:08 +01:00
|
|
|
/**
|
|
|
|
* Get plugin description
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2013-11-10 12:00:47 +01:00
|
|
|
public function getDescription() {
|
2013-11-10 11:49:32 +01:00
|
|
|
return $this->description;
|
|
|
|
}
|
2013-11-10 02:55:08 +01:00
|
|
|
}
|
2013-11-09 19:26:57 +01:00
|
|
|
|
2013-11-10 02:55:08 +01:00
|
|
|
?>
|