- improved player and playerHandler

- logs subfolder
This commit is contained in:
Steffen Schröder
2013-11-10 17:23:00 +01:00
parent bc5b1842c2
commit 950ad1098b
4 changed files with 207 additions and 87 deletions

View File

@ -3,37 +3,28 @@
namespace ManiaControl;
/**
* Class manialinkidHandler handles manialink id's
* Handler for manialink ids
*
* @author Lukas Kremsmayr and steeffeen
* @author kremsy & steeffeen
*/
class ManialinkIdHandler {
/**
* Private properties
*/
private $maniaLinkIdCount;
public function __construct(){
$maniaLinkIdCount = 0;
}
/**
* Reservses manialinks for a plugin
*
* @param int $count
* @return array with manialink Ids
class ManialinkIdHandler {
/**
* Private properties
*/
public function reserveManiaLinkIds($count){
$mlIds = array();
for($i = 0; $i < $count; $i++){
$mlIds[0] = $i + $this->maniaLinkIdCount;
}
$this->maniaLinkIdCount += $count;
return $mlIds;
}
private $maniaLinkIdCount = 0;
}
/**
* Reserve manialink ids
*
* @param int $count
* @return array with manialink Ids
*/
public function reserveManiaLinkIds($count) {
$mlIds = array();
for ($i = 0; $i < $count; $i++) {
array_push($mlIds, ++$this->maniaLinkIdCount);
}
return $mlIds;
}
}
?>