protected function _actionGet(AnCommandContext $context)
    {
        if ($context->request->getFormat() == 'html') {
            $context->response->setRedirect(route('format=json&option=com_connect&view='.$this->view));
            return;
        }

        if ($this->get) {
            $url = ltrim($this->get, '/');
            $data = AnConfig::unbox($this->api->get($url));
            $data = json_encode($data);
        } else {
            $data = (array) $this->api->getUser();
        }

        $this->getView()->data($data);

        return parent::_actionGet($context);
    }
protected function _actionGet(AnCommandContext $context)
    {
        if ($context->request->getFormat() == 'html') {
            $context->response->setRedirect(route('format=json&option=com_connect&view='.$this->view));
            return;
        }

        if ($this->get) {
            $url = ltrim($this->get, '/');
            $data = AnConfig::unbox($this->api->get($url));
            $data = json_encode($data);
        } else {
            $data = (array) $this->api->getUser();
        }

        $this->getView()->data($data);

        return parent::_actionGet($context);
    }
protected function _actionGet ( AnCommandContext $ context ) { if ( $ context -> request -> getFormat ( ) == 'html' ) { $ context -> response -> setRedirect ( route ( 'format=json&option=com_connect&view=' . $ this -> view ) ) ; return ; } if ( $ this -> get ) { $ url = ltrim ( $ this -> get , '/' ) ; $ data = AnConfig :: unbox ( $ this -> api -> get ( $ url ) ) ; $ data = json_encode ( $ data ) ; } else { $ data = ( array ) $ this -> api -> getUser ( ) ; } $ this -> getView ( ) -> data ( $ data ) ; return parent :: _actionGet ( $ context ) ; }
Dispatches a call to the oauth handler.

@return
Dispatches a call to the oauth handler .