infinito/application/symfony/src/Attribut/ConditionAttribut.php

32 lines
549 B
PHP
Raw Normal View History

2018-09-21 15:48:23 +02:00
<?php
2019-01-20 10:41:58 +01:00
namespace App\Attribut;
2018-09-21 15:48:23 +02:00
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
{
2018-11-06 20:56:54 +01:00
return $this->condition instanceof OperationInterface;
2018-09-21 15:48:23 +02:00
}
}