TrackManiaControl/application/core/Manialinks/ManialinkIdHandler.php

32 lines
518 B
PHP
Raw Normal View History

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