2014-04-07 15:25:16 +02:00
|
|
|
<?php
|
|
|
|
namespace DigiComp\Sequence\Domain\Model;
|
|
|
|
|
|
|
|
/* *
|
|
|
|
* This script belongs to the FLOW3 package "DigiComp.Sequence". *
|
|
|
|
* *
|
|
|
|
* */
|
|
|
|
|
|
|
|
use TYPO3\Flow\Annotations as Flow;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
2016-06-24 19:40:43 +02:00
|
|
|
|
2014-04-07 15:25:16 +02:00
|
|
|
/**
|
|
|
|
* SequenceInsert
|
|
|
|
*
|
|
|
|
* @author fcool
|
|
|
|
* @Flow\Scope("prototype")
|
|
|
|
* @Flow\Entity
|
|
|
|
*/
|
2016-06-24 19:40:43 +02:00
|
|
|
class Insert
|
|
|
|
{
|
2014-04-07 15:25:16 +02:00
|
|
|
|
2016-06-24 19:40:43 +02:00
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
* @ORM\Id
|
|
|
|
* @Flow\Identity
|
|
|
|
*/
|
|
|
|
protected $number;
|
2014-04-07 15:25:16 +02:00
|
|
|
|
2016-06-24 19:40:43 +02:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
* @ORM\Id
|
|
|
|
* @Flow\Identity
|
|
|
|
*/
|
|
|
|
protected $type;
|
2014-04-07 15:25:16 +02:00
|
|
|
|
2016-06-24 19:40:43 +02:00
|
|
|
/**
|
|
|
|
* @param int $number
|
|
|
|
* @param string|object $type
|
|
|
|
*/
|
|
|
|
public function __construct($number, $type)
|
|
|
|
{
|
|
|
|
$this->setType($type);
|
|
|
|
$this->setNumber($number);
|
|
|
|
}
|
2014-04-07 15:25:16 +02:00
|
|
|
|
2016-06-24 19:40:43 +02:00
|
|
|
/**
|
|
|
|
* @param int $number
|
|
|
|
*/
|
|
|
|
public function setNumber($number)
|
|
|
|
{
|
|
|
|
$this->number = $number;
|
|
|
|
}
|
2014-04-07 15:25:16 +02:00
|
|
|
|
2016-06-24 19:40:43 +02:00
|
|
|
/**
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getNumber()
|
|
|
|
{
|
|
|
|
return $this->number;
|
|
|
|
}
|
2014-04-07 15:25:16 +02:00
|
|
|
|
2016-06-24 19:40:43 +02:00
|
|
|
/**
|
|
|
|
* @param string|object $type
|
|
|
|
*/
|
|
|
|
public function setType($type)
|
|
|
|
{
|
|
|
|
if (is_object($type)) {
|
|
|
|
$type = get_class($type);
|
|
|
|
}
|
|
|
|
$this->type = $type;
|
|
|
|
}
|
2014-04-07 15:25:16 +02:00
|
|
|
|
2016-06-24 19:40:43 +02:00
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getType()
|
|
|
|
{
|
|
|
|
return $this->type;
|
|
|
|
}
|
|
|
|
}
|