Added drafts for entity interfaces

This commit is contained in:
Kevin Frantz
2018-07-14 00:15:00 +02:00
parent 4845deddc6
commit 6fcef40e10
8 changed files with 297 additions and 0 deletions

View 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;
}