Created
August 11, 2023 17:28
-
-
Save mansha99/6f6df19a5213342982a26f89422e7701 to your computer and use it in GitHub Desktop.
Dependency injection : Interfaces
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 | |
class GithubUserService | |
{ | |
private GithubUserRepoInterface $githubUserRepo; | |
public function __construct(GithubUserRepoInterface $githubUserRepo) | |
{ | |
$this->githubUserRepo = $githubUserRepo; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment