TrackManiaControl/application/core/manialinkIdHandler.php

30 lines
484 B
PHP
Raw Normal View History

2013-11-09 11:06:04 +01:00
<?php
2013-11-09 12:20:38 +01:00
namespace ManiaControl;
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) {
$mlIds = array();
for ($i = 0; $i < $count; $i++) {
array_push($mlIds, ++$this->maniaLinkIdCount);
}
return $mlIds;
}
}
2013-11-09 11:06:04 +01:00
?>