20250113#1
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Zuev Yuri
|
||||
*/
|
||||
|
||||
namespace Base\Domain;
|
||||
|
||||
abstract class AbstractObject implements EntityInterface {
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
*/
|
||||
public function getId(): mixed {
|
||||
return (isset($this->id)) ? (($this->id instanceof ValueObjectInterface) ? $this->id->get() : $this->id) : null;
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Zuev Yuri
|
||||
* Date: 23.04.2024
|
||||
* Time: 3:58
|
||||
*/
|
||||
|
||||
namespace Base\Domain;
|
||||
|
||||
interface EntityInterface {
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
*/
|
||||
public function getId(): mixed;
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Zuev Yuri
|
||||
* Date: 23.04.2024
|
||||
* Time: 3:58
|
||||
*/
|
||||
|
||||
namespace Base\Domain;
|
||||
|
||||
interface ValueObjectInterface {
|
||||
|
||||
public function get();
|
||||
public function __toString(): string;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user