2013-11-09 11:06:04 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace mControl;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class plugin parent class for all plugins
|
|
|
|
*
|
|
|
|
* @author Lukas Kremsmayr and steeffeen
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
class Plugin {
|
|
|
|
|
2013-11-09 12:15:02 +01:00
|
|
|
/**
|
|
|
|
* Private properties
|
|
|
|
*/
|
|
|
|
private $mControl;
|
|
|
|
private $version;
|
|
|
|
private $author;
|
|
|
|
private $updateUrl;
|
|
|
|
private $name;
|
2013-11-09 11:06:04 +01:00
|
|
|
|
2013-11-09 12:15:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
2013-11-09 11:06:04 +01:00
|
|
|
}
|
|
|
|
?>
|