Advertisement
Guest User

Untitled

a guest
Aug 19th, 2015
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. <?php
  2.  
  3. class myobjProxy {
  4.     private $subjClass = 'myobj';
  5.     public function __construct(\Auryn\Injector $inj){ $this->inj = $inj; }
  6.    
  7.     private createSubjectClass()
  8.     {
  9.     return $this->inj->make($this->subjClass);
  10.     }
  11.    public function __get($k){
  12.        $r = $this->createSubjectClass();
  13.        return $r->$k;
  14.    }
  15.  
  16.    // same for all othe methods
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement