public function getProxyTarget($class)
    {
        if (!isset($this->registry[$class])) {
            throw new \RuntimeException($class.' not registered as a static proxy.');
        }

        if ($id = $this->registry[$class]['id']) {
            return call_user_func_array($this->registry[$class]['target'], array($id));
        } else {

            if ($closure = $this->registry[$class]['closure']) {
                $this->registry[$class]['target'] = $closure();
                $this->registry[$class]['closure'] = null;
            }

            return $this->registry[$class]['target'];
        }
    }
public function getProxyTarget($class)
    {
        if (!isset($this->registry[$class])) {
            throw new \RuntimeException($class.' not registered as a static proxy.');
        }

        if ($id = $this->registry[$class]['id']) {
            return call_user_func_array($this->registry[$class]['target'], array($id));
        } else {

            if ($closure = $this->registry[$class]['closure']) {
                $this->registry[$class]['target'] = $closure();
                $this->registry[$class]['closure'] = null;
            }

            return $this->registry[$class]['target'];
        }
    }
public function getProxyTarget ( $ class ) { if ( ! isset ( $ this -> registry [ $ class ] ) ) { throw new \ RuntimeException ( $ class . ' not registered as a static proxy.' ) ; } if ( $ id = $ this -> registry [ $ class ] [ 'id' ] ) { return call_user_func_array ( $ this -> registry [ $ class ] [ 'target' ] , array ( $ id ) ) ; } else { if ( $ closure = $ this -> registry [ $ class ] [ 'closure' ] ) { $ this -> registry [ $ class ] [ 'target' ] = $ closure ( ) ; $ this -> registry [ $ class ] [ 'closure' ] = null ; } return $ this -> registry [ $ class ] [ 'target' ] ; } }
Returns the target instance of the static proxy.

This function is called from Statical\BaseProxy to resolve proxy targets.

@param string $class
@throws RuntimeException
@return mixed
Returns the target instance of the static proxy .