Skip to content

Instantly share code, notes, and snippets.

@aranajhonny
Created April 19, 2016 16:44
Show Gist options
  • Save aranajhonny/191081e8e335b1363d8b2638f6385090 to your computer and use it in GitHub Desktop.
Save aranajhonny/191081e8e335b1363d8b2638f6385090 to your computer and use it in GitHub Desktop.
<?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