Last active
July 2, 2020 15:01
-
-
Save thiagocordeiro/c9ca2a7aa6d554c2efafb0d5066edbf9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
/** | |
* @Route('/users', methods={'POST'}) | |
*/ | |
class RegisterUserController | |
{ | |
private RegisterUserService $service; | |
public function __construct(RegisterUserService $service) { ... } | |
public function __invoke(Request $request) | |
{ | |
$this->service->register( ... ); | |
} | |
} | |
/** | |
* @Route('/users', methods={'GET'}) | |
*/ | |
class GetUserListController | |
{ | |
private ListUserService $service; | |
public function __construct(ListUserService $service) { ... } | |
public function __invoke(Request $request) | |
{ | |
$this->service->getUserList( ... ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment