Last active
April 25, 2016 20:57
-
-
Save guilhermeblanco/56ec0e11e7b029c2cfdcaf6fe2323742 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 | |
interface Entity<ID> { | |
public function getId() : ID; | |
} | |
class AuctionItem implements Entity<string> { | |
private $id; | |
public function getId() : string { | |
return $this->id; | |
} | |
} | |
abstract class EntityRepository<ID, E extends Entity<ID>> { | |
// ... | |
} | |
final class AuctionItemRepository extends EntityRepository<string, AuctionItem> { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment