Created
April 19, 2016 16:44
-
-
Save aranajhonny/191081e8e335b1363d8b2638f6385090 to your computer and use it in GitHub Desktop.
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
<?php | |
namespace App\Domain; | |
class User | |
{ | |
/** | |
* @type string | |
*/ | |
protected $email; | |
/** | |
* @type string | |
*/ | |
protected $password; | |
/** | |
* @type string | |
*/ | |
protected $firstName; | |
/** | |
* @type string | |
*/ | |
protected $lastName; | |
public function __construct($anEmail, $password) | |
{ | |
$this->email = $anEmail; | |
$this->password = password_hash($password, PASSWORD_DEFAULT); | |
} | |
/** | |
* @param string $firstName | |
* @param string $lastName | |
*/ | |
public function setName($firstName, $lastName) | |
{ | |
$this->firstName = $firstName; | |
$this->lastName = $lastName; | |
} | |
/** | |
* @return string | |
*/ | |
public function getFirstName() | |
{ | |
return $this->firstName; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment