mirror of
https://github.com/kevinveenbirkenbach/coding-challenge-online-shop.git
synced 2025-09-10 11:57:12 +02:00
Added drafts for entity interfaces
This commit is contained in:
49
src/entity/user/UserInterface.php
Normal file
49
src/entity/user/UserInterface.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
namespace entity\user;
|
||||
|
||||
/**
|
||||
* Theoreticly you could make an own entity for name
|
||||
* (Depends on the use case.)
|
||||
* In this case I just assume that the user just has an username, which is just a string
|
||||
* The same counts for email ;) -> In a real application: Entity Email ;)
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
interface UserInterface
|
||||
{
|
||||
/**
|
||||
* @param string $hash
|
||||
*/
|
||||
public function setPasswordHash(string $hash):void;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPasswordHash():string;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*/
|
||||
public function setName(string $name):void;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName():string;
|
||||
|
||||
/**
|
||||
* @param string $email
|
||||
*/
|
||||
public function setEmail(string $email):void;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getEmail():string;
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getId():int;
|
||||
}
|
||||
|
Reference in New Issue
Block a user