Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
4 / 4 |
| Login | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
4 / 4 |
| getLoginPage | |
100.00% |
1 / 1 |
1 | |
100.00% |
4 / 4 |
|||
| <?php | |
| namespace Luxian\Controller; | |
| use Luxian\Http\Response; | |
| class Login extends ControllerBase | |
| { | |
| public function getLoginPage(): Response | |
| { | |
| $response = new Response(); | |
| $response->setBody( | |
| '<title>Login</title> | |
| <form method="post"> | |
| <fieldset> | |
| <legend>Login</legend> | |
| <div class="form-item"> | |
| <label for="login-username">Username</label><br/> | |
| <input type="text" name="username" /> | |
| </div> | |
| <div class="form-item"> | |
| <label for="login-password">Password</label><br/> | |
| <input type="password" name="password" /><br/> | |
| <a href="/password-reset">Reset your password</a> | |
| </div> | |
| <div class="form-actions"> | |
| <button type="submit">Login</button> | |
| <a href="/register">Register</a> | |
| </div> | |
| </fieldset> | |
| </form>' | |
| ); | |
| return $response; | |
| } | |
| } |