TrackManiaControl/application/core/Manialinks/ManialinkIdHandler.php
Steffen Schröder a9b1842a6f - Improved Join/Leave messages
- Moved Server Commands into separate class
- Added \Server namespace
2013-11-19 20:29:37 +01:00

32 lines
518 B
PHP

<?php
namespace ManiaControl\Manialinks;
/**
* Handler for manialink ids
*
* @author kremsy & steeffeen
*/
class ManialinkIdHandler {
/**
* Private properties
*/
private $maniaLinkIdCount = 0;
/**
* Reserve manialink ids
*
* @param int $count
* @return array with manialink Ids
*/
public function reserveManiaLinkIds($count) {
$manialinkIds = array();
for ($i = 0; $i < $count; $i++) {
array_push($manialinkIds, $this->maniaLinkIdCount++);
}
return $manialinkIds;
}
}
?>