public function get($username)
    {
        $url      = UrlHelper::buildUrl(Urls::URL_USER, [$username]);
        $response = $this->getConnection()->get($url);

        $data = $response->getJson();

        $options = ['_isNew' => false];

        $_documentClass = $this->_documentClass;
        return $_documentClass::createFromArray($data, $options);
    }
public function get($username)
    {
        $url      = UrlHelper::buildUrl(Urls::URL_USER, [$username]);
        $response = $this->getConnection()->get($url);

        $data = $response->getJson();

        $options = ['_isNew' => false];

        $_documentClass = $this->_documentClass;
        return $_documentClass::createFromArray($data, $options);
    }
public function get ( $ username ) { $ url = UrlHelper :: buildUrl ( Urls :: URL_USER , [ $ username ] ) ; $ response = $ this -> getConnection ( ) -> get ( $ url ) ; $ data = $ response -> getJson ( ) ; $ options = [ '_isNew' => false ] ; $ _documentClass = $ this -> _documentClass ; return $ _documentClass :: createFromArray ( $ data , $ options ) ; }
Get a single user-document, identified by the username

This will throw if the document cannot be fetched from the server

@throws Exception

@param string $username - username as a string

@return User - the user-document fetched from the server
Get a single user - document identified by the username