Skip to content

Instantly share code, notes, and snippets.

@index0h
Created June 17, 2016 14:01
Show Gist options
  • Save index0h/7b1d0ddacb8f1126bfe156fc44bd2cb2 to your computer and use it in GitHub Desktop.
Save index0h/7b1d0ddacb8f1126bfe156fc44bd2cb2 to your computer and use it in GitHub Desktop.
MyRegistrationForm.php
<?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