mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Optimized folder draft
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Logic\Result\ResultInterface;
|
||||
use App\Logic\Operation\OperationInterface;
|
||||
use App\Logic\Operation\OperandInterface;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="source_operation")
|
||||
* @ORM\InheritanceType("JOINED")
|
||||
* @ORM\DiscriminatorColumn(name="discr", type="string")
|
||||
* @ORM\DiscriminatorMap({"and" = "AndOperation"})
|
||||
*/
|
||||
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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user