Guest User

Untitled

a guest
Jul 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. class MyClass
  2. {
  3.  
  4. public static function factory(){
  5. return new MyClass();
  6. }
  7.  
  8. public function method(){
  9. echo "Did a method";
  10.  
  11. return $this;
  12. }
  13.  
  14.  
  15. public function method2(){
  16. echo "Did a method2";
  17.  
  18. return $this;
  19. }
  20. }
  21.  
  22. // code
  23.  
  24. MyClass::factory()->method()->method2();
Add Comment
Please, Sign In to add comment