- improved player and playerHandler
- logs subfolder
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user