Guest User

Untitled

a guest
Jul 19th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. /**
  2. * @param string $key
  3. * @return View
  4. */
  5. public function __get($key){
  6. return $this->getView($key);
  7. }
  8.  
  9. $view->foo-> // should populate with methods from View
  10. ^
  11.  
  12. $view->foo->bar->baz-> // should populate with methods from View
  13. ^
  14.  
  15. /**
  16. * @property View *
  17. * @property View ...
  18. * @property View $var,...
  19. */
  20.  
  21. <?php
  22.  
  23. /**
  24. * @property Bar $prop
  25. */
  26. class foo {
  27.  
  28. }
  29.  
  30. class bar {
  31. public function xyz() {
  32.  
  33. }
  34.  
  35. public function abc() {
  36.  
  37. }
  38. }
  39.  
  40. $x = new foo();
  41. $x->prop->
  42.  
  43. /** @var Viewclass $foo */
  44. $foo = $x->y->z->view;
  45. $foo->autoCompleteWorksNow();
Add Comment
Please, Sign In to add comment