-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
97ea7c6
commit 576eb36
Showing
20 changed files
with
694 additions
and
660 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<?php | ||
|
||
namespace NilPortugues\Example; | ||
|
||
use DateTime; | ||
use NilPortugues\Foundation\Domain\Model\Repository\Contracts\Identity; | ||
|
||
/** | ||
* Class User. | ||
*/ | ||
class User implements Identity | ||
{ | ||
protected $userId; | ||
protected $username; | ||
protected $alias; | ||
protected $email; | ||
protected $registeredOn; | ||
|
||
/** | ||
* User constructor. | ||
* | ||
* @param $userId | ||
* @param $username | ||
* @param $alias | ||
* @param $email | ||
* @param DateTime $registeredOn | ||
*/ | ||
public function __construct($userId, $username, $alias, $email, DateTime $registeredOn) | ||
{ | ||
$this->userId = $userId; | ||
$this->username = $username; | ||
$this->alias = $alias; | ||
$this->email = $email; | ||
$this->registeredOn = $registeredOn; | ||
} | ||
|
||
/** | ||
* Returns value for `userId`. | ||
* | ||
* @return mixed | ||
*/ | ||
public function userId() | ||
{ | ||
return $this->userId; | ||
} | ||
|
||
/** | ||
* Returns value for `username`. | ||
* | ||
* @return mixed | ||
*/ | ||
public function username() | ||
{ | ||
return $this->username; | ||
} | ||
|
||
/** | ||
* Returns value for `alias`. | ||
* | ||
* @return mixed | ||
*/ | ||
public function alias() | ||
{ | ||
return $this->alias; | ||
} | ||
|
||
/** | ||
* Returns value for `email`. | ||
* | ||
* @return mixed | ||
*/ | ||
public function email() | ||
{ | ||
return $this->email; | ||
} | ||
|
||
/** | ||
* Returns value for `registeredOn`. | ||
* | ||
* @return DateTime | ||
*/ | ||
public function registeredOn() | ||
{ | ||
return $this->registeredOn; | ||
} | ||
|
||
/** | ||
* @return mixed | ||
*/ | ||
public function id() | ||
{ | ||
return $this->userId; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function __toString() | ||
{ | ||
return (string) $this->id(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.