Skip to content

Commit a46b5d4

Browse files
committed
WIP
1 parent 15d7e4f commit a46b5d4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Primitive.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Flat3\Lodata;
66

7+
use BackedEnum;
78
use Flat3\Lodata\Controller\Response;
89
use Flat3\Lodata\Controller\Transaction;
910
use Flat3\Lodata\Exception\Protocol\NoContentException;
@@ -49,6 +50,7 @@ abstract class Primitive implements ResourceInterface, ContextInterface, Identif
4950

5051
public function __construct($value = null)
5152
{
53+
$value = $value instanceof BackedEnum ? $value->value : $value;
5254
$this->set($value);
5355
}
5456

0 commit comments

Comments
 (0)