From 40b5e94ec35e91ae1df1a1fea7b54dd7ee67558a Mon Sep 17 00:00:00 2001 From: kremsy Date: Sat, 9 Nov 2013 12:15:02 +0100 Subject: [PATCH] started with plugin class --- application/core/plugin.php | 103 ++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/application/core/plugin.php b/application/core/plugin.php index eba5f8e8..4a30f1b7 100644 --- a/application/core/plugin.php +++ b/application/core/plugin.php @@ -11,6 +11,109 @@ namespace mControl; class Plugin { + /** + * Private properties + */ + private $mControl; + private $version; + private $author; + private $updateUrl; + private $name; + + + public function __construct($mControl, $name){ + $this->mControl = $mControl; + $this->name = $name; + $this->version = 0; + $this->author = ''; + $this->updateUrl = ''; + } + + /* + public function __construct($mControl, $name, $version, $author, $updateUrl = ''){ + $this->mControl = $mControl; + $this->name = $name; + $this->version = $version; + $this->author = $author; + $this->updateUrl = $updateUrl; + }*/ + + /** + * Reserves manialinks on the ManialinkIdHandler + * + * @param int $count + * @return array with manialink Ids + */ + public function reserveManialinkIds($count){ + return $this->mControl->manialinkIdHandler->reserveManialikIds($count); + } + + public function checkUpdate(){ + + } + + /** + * @param mixed $author + */ + public function setAuthor($author) + { + $this->author = $author; + } + + /** + * @return mixed + */ + public function getAuthor() + { + return $this->author; + } + + /** + * @param mixed $updateUrl + */ + public function setUpdateUrl($updateUrl) + { + $this->updateUrl = $updateUrl; + } + + /** + * @return mixed + */ + public function getUpdateUrl() + { + return $this->updateUrl; + } + + /** + * @param mixed $version + */ + public function setVersion($version) + { + $this->version = $version; + } + + /** + * @return mixed + */ + public function getVersion() + { + return $this->version; + } + /** + * @param mixed $name + */ + public function setName($name) + { + $this->name = $name; + } + + /** + * @return mixed + */ + public function getName() + { + return $this->name; + } } ?> \ No newline at end of file