Created
June 17, 2016 14:01
-
-
Save index0h/7b1d0ddacb8f1126bfe156fc44bd2cb2 to your computer and use it in GitHub Desktop.
MyRegistrationForm.php
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 | |
class MyRegistrationForm | |
{ | |
/** @var string */ | |
private $email; | |
/** @var string */ | |
private $password; | |
/** | |
* @param Request $request | |
*/ | |
public function __construct(Request $request) | |
{ | |
$email = $request->request->get('email'); | |
// check here | |
$password = $request->request->get('password'); | |
// check here | |
$this->email = $email; | |
$this->password = $password; | |
} | |
/** | |
* @return string | |
*/ | |
public function getEmail() : string | |
{ | |
return $this->email; | |
} | |
/** | |
* @return string | |
*/ | |
public function getPassword() : string | |
{ | |
return $this->password; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment