mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-25 13:12:22 +01:00
39 lines
770 B
PHP
39 lines
770 B
PHP
|
<?php
|
||
|
namespace App\Entity;
|
||
|
|
||
|
use App\Logic\Result\ResultInterface;
|
||
|
use App\Logic\Operation\OperationInterface;
|
||
|
use App\Logic\Operation\OperandInterface;
|
||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @author kevinfrantz
|
||
|
*
|
||
|
*/
|
||
|
abstract class AbstractOperation extends AbstractSource implements OperationInterface
|
||
|
{
|
||
|
|
||
|
/**
|
||
|
* The result MUST NOT be saved via Doctrine!
|
||
|
* @var ResultInterface
|
||
|
*/
|
||
|
protected $result;
|
||
|
|
||
|
/**
|
||
|
* @var ArrayCollection|OperandInterface[]
|
||
|
*/
|
||
|
protected $operands;
|
||
|
|
||
|
public function getResult(): ResultInterface
|
||
|
{
|
||
|
return $this->result;
|
||
|
}
|
||
|
|
||
|
public function setOperators(ArrayCollection $operands): void
|
||
|
{
|
||
|
$this->operands = $operands;
|
||
|
}
|
||
|
}
|
||
|
|