51 lines
924 B
PHP
51 lines
924 B
PHP
<?php
|
|
|
|
namespace PSC\Library\Calc\Model;
|
|
|
|
use PSC\Library\Calc\Graph\Tree\Node;
|
|
|
|
class Part extends Node
|
|
{
|
|
public function __construct(
|
|
private PartType $type,
|
|
private string $name,
|
|
private string $unParsed,
|
|
private string $parsed = '',
|
|
private int $result = 0,
|
|
) {
|
|
if($parsed == '') {
|
|
$this->parsed = $unParsed;
|
|
}
|
|
}
|
|
|
|
public function getName(): string
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
public function getUnparsed(): string
|
|
{
|
|
return $this->unParsed;
|
|
}
|
|
|
|
public function getParsed(): string
|
|
{
|
|
return $this->parsed;
|
|
}
|
|
|
|
public function setParsed(string $parsed): void
|
|
{
|
|
$this->parsed = $parsed;
|
|
}
|
|
|
|
public function setResult(int $result): void
|
|
{
|
|
$this->result = $result;
|
|
}
|
|
|
|
public function getResult(): string
|
|
{
|
|
return $this->result;
|
|
}
|
|
}
|