| 1 | <?php |
||
| 14 | class TestCommand implements Command |
||
| 15 | { |
||
| 16 | use HandlePropertiesFormArrayTrait; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | * @NotBlank() |
||
| 21 | */ |
||
| 22 | private $username; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var string |
||
| 26 | * @NotBlank() |
||
| 27 | * @Assert\Email() |
||
| 28 | */ |
||
| 29 | private $email; |
||
| 30 | |||
| 31 | |||
| 32 | public function handle($username, $email) |
||
| 37 | |||
| 38 | |||
| 39 | public function handleFromArray(array $data) |
||
| 43 | |||
| 44 | |||
| 45 | public function commandName() |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | public function getUsername() |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | public function getEmail() |
||
| 65 | } |
||
| 66 |