Advertisement
Guest User

Untitled

a guest
Oct 19th, 2016
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. <?php
  2.  
  3. class AAA{}
  4. class BBB extends AAA{}
  5.  
  6. class X<T is AAA>{
  7. protected T $foo;
  8. function __construct(T $foo){
  9. $this->foo = $foo;
  10. }
  11. function set(T $foo){
  12. $this->foo = $foo;
  13. }
  14. }
  15.  
  16. class Y<T is BBB> extends X<T>{
  17. function __construct(T $foo){
  18. parent::__construct($foo);
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement