learning-center/app/SharedKernel/Structs/ValueObject.php

21 lines
319 B
PHP
Raw Permalink Normal View History

2024-09-08 13:48:26 +03:00
<?php
declare(strict_types=1);
namespace App\SharedKernel\Structs;
abstract class ValueObject implements \Stringable
{
public $value;
public function __construct($value)
{
$this->value = $value;
}
public function __toString(): string
{
return (string) $this->value;
}
}