2022-07-05 15:55:47 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace DNW\Skills\FactorGraphs;
|
2010-09-18 11:11:44 -04:00
|
|
|
|
2022-07-05 16:21:06 +02:00
|
|
|
class Message implements \Stringable
|
2010-09-18 11:11:44 -04:00
|
|
|
{
|
2022-07-05 16:21:06 +02:00
|
|
|
public function __construct(private $_value = null, private $_name = null)
|
2010-09-18 11:11:44 -04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-05-24 16:31:21 +02:00
|
|
|
public function getValue()
|
2010-09-18 11:11:44 -04:00
|
|
|
{
|
2016-05-24 16:31:21 +02:00
|
|
|
return $this->_value;
|
2010-09-18 11:11:44 -04:00
|
|
|
}
|
|
|
|
|
2016-05-24 16:31:21 +02:00
|
|
|
public function setValue($value)
|
2016-05-24 14:10:39 +02:00
|
|
|
{
|
2016-05-24 16:31:21 +02:00
|
|
|
$this->_value = $value;
|
2010-09-28 08:12:06 -04:00
|
|
|
}
|
|
|
|
|
2022-07-05 16:21:06 +02:00
|
|
|
public function __toString(): string
|
2010-09-18 11:11:44 -04:00
|
|
|
{
|
2022-07-05 15:55:47 +02:00
|
|
|
return (string) $this->_name;
|
2010-09-18 11:11:44 -04:00
|
|
|
}
|
2022-07-05 15:55:47 +02:00
|
|
|
}
|