| Total Complexity | 5 |
| Total Lines | 62 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Output implements DmnConvertibleInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | private $label; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | private $name; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | private $type; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Input constructor. |
||
| 28 | * @param string $label |
||
| 29 | * @param string $name |
||
| 30 | * @param string $type |
||
| 31 | */ |
||
| 32 | public function __construct($label, $name, $type) |
||
| 33 | { |
||
| 34 | $this->label = $label; |
||
| 35 | $this->name = $name; |
||
| 36 | $this->type = $type; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Returns an XML representation of an output. |
||
| 41 | * |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | public function toDMN() |
||
| 45 | { |
||
| 46 | return '<output id="' . uniqid('output') . '" label="' . $this->label . '" name="' . $this->name . '" typeRef="' . $this->type . '"/>'; |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | public function getLabel() |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @return string |
||
| 59 | */ |
||
| 60 | public function getName() |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @return string |
||
| 67 | */ |
||
| 68 | public function getType() |
||
| 71 | } |
||
| 72 | } |