mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-10 14:27:28 +01:00
32 lines
549 B
PHP
32 lines
549 B
PHP
<?php
|
|
|
|
namespace App\Attribut;
|
|
|
|
use App\Logic\Operation\OperationInterface;
|
|
|
|
/**
|
|
* @author kevinfrantz
|
|
*/
|
|
trait ConditionAttribut
|
|
{
|
|
/**
|
|
* @var OperationInterface
|
|
*/
|
|
protected $condition;
|
|
|
|
public function getCondition(): OperationInterface
|
|
{
|
|
return $this->condition;
|
|
}
|
|
|
|
public function setCondition(OperationInterface $condition): void
|
|
{
|
|
$this->condition = $condition;
|
|
}
|
|
|
|
public function hasCondition(): bool
|
|
{
|
|
return $this->condition instanceof OperationInterface;
|
|
}
|
|
}
|