- subfolders for different classes
- Improved file and class naming - "handler"-> "listener" (callbacks, commands)
This commit is contained in:
31
application/core/Manialinks/ManialinkIdHandler.php
Normal file
31
application/core/Manialinks/ManialinkIdHandler.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?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) {
|
||||
$mlIds = array();
|
||||
for ($i = 0; $i < $count; $i++) {
|
||||
array_push($mlIds, ++$this->maniaLinkIdCount);
|
||||
}
|
||||
return $mlIds;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user