Guest User

Untitled

a guest
May 21st, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <?php
  2.  
  3. use yii\base\Component;
  4. use yii\base\Behavior;
  5.  
  6. class api extends Components {
  7.  
  8.  
  9. }
  10.  
  11. class APIBehavior extends Behavior
  12. {
  13. function login(){}
  14. }
  15.  
  16. class Container extends Components {
  17. private $endpoint1;
  18.  
  19. public function init (){
  20. $this->endpoint1 = new api;
  21. $this->endpoint1->addBehaviour('auth', new APIBehavior);
  22. }
  23. }
  24.  
  25. class EContainer extends Container {
  26. private $endpoint2;
  27.  
  28. public function init (){
  29. $this->endpoint2 = new api;
  30. $this->endpoint2->addBehaviour('auth', new APIBehavior);
  31. }
  32. public function request(){
  33.  
  34. }
  35. }
Add Comment
Please, Sign In to add comment