for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SteffenBrand\DmnDecisionTables\Model;
use SteffenBrand\DmnDecisionTables\Constant\ExpressionLanguage;
/**
* Class OutputEntry
* @package SteffenBrand\DmnDecisionTables\Model
*/
class OutputEntry implements DmnConvertibleInterface
{
* @var string
private $expression;
private $expressionLanguage;
* OutputEntry constructor.
* @param string $expression
* @param string $expressionLanguage
public function __construct($expression, $expressionLanguage = ExpressionLanguage::JUEL_LANGUAGE)
$this->expression = $expression;
$this->expressionLanguage = $expressionLanguage;
}
* Returns an XML representation of an output entry.
*
* @return string
public function toDMN()
$xml = '';
if (isset($this->expression) === false || trim($this->expression) === '') {
$xml .=
'<outputEntry id="' . uniqid('outputEntry') . '"><text/></outputEntry>';
} else {
'<outputEntry id="' . uniqid('outputEntry') . '" expressionLanguage="' . $this->expressionLanguage . '">' .
'<text><![CDATA[' . $this->expression . ']]></text>' .
'</outputEntry>';
return $xml;
public function getExpression()
return $this->expression;
public function getExpressionLanguage()
return $this->expressionLanguage;