DigiComp.Sequence/Classes/DigiComp/Sequence/Command/SequenceCommandController.php

39 lines
1 KiB
PHP
Raw Normal View History

2014-04-07 15:25:16 +02:00
<?php
namespace DigiComp\Sequence\Command;
/* *
* This script belongs to the FLOW3 package "DigiComp.Sequence". *
* *
* */
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Cli\CommandController;
2014-04-07 15:25:16 +02:00
/**
* A database agnostic SequenceNumber generator
2014-04-07 15:25:16 +02:00
*
* @Flow\Scope("singleton")
*/
class SequenceCommandController extends CommandController
2016-06-24 19:40:43 +02:00
{
2014-04-07 15:25:16 +02:00
2016-06-24 19:40:43 +02:00
/**
* @var \DigiComp\Sequence\Service\SequenceGenerator
* @Flow\Inject
*/
protected $sequenceGenerator;
2014-04-07 15:25:16 +02:00
2016-06-24 19:40:43 +02:00
/**
* Sets minimum number for sequence generator
*
* @param int $to
* @param string $type
*/
public function advanceCommand($to, $type)
{
$this->sequenceGenerator->advanceTo($to, $type);
}
//TODO: make clean up job to delete all but the biggest number to save resources
2014-04-07 15:25:16 +02:00
}