| 1 | <?php |
||
| 9 | * |
||
| 10 | * For the full copyright and license information, please view the LICENSE |
||
| 11 | * file that was distributed with this source code. |
||
| 12 | */ |
||
| 13 | |||
| 14 | namespace Domain\Model\Article\Entities; |
||
| 15 | |||
| 16 | use Domain\Model\Common\VO\NameField; |
||
| 17 | |||
| 18 | final class ZoneStorage |
||
| 19 | { |
||
| 20 | private string $name; |
||
|
|
|||
| 21 | private string $slug; |
||
| 22 | |||
| 23 | public function __construct(NameField $name) |
||
| 24 | { |
||
| 25 | $this->name = $name->getValue(); |
||
| 26 | $this->slug = $name->slugify(); |
||
| 27 | } |
||
| 28 | |||
| 29 | public static function create(NameField $name): self |
||
| 30 | { |
||
| 31 | return new self($name); |
||
| 50 |