/** * Change the service to a complete URL * @param string|Gnkw\Http\Uri $service The service to transform * @return string The complete URL */ protected function urlService($service) { if ($service instanceof Uri) { $uri = $service->get(); } else { $uri = $service; } return $this->baseUrl . '/' . ltrim($uri, '/'); }
/** * Select a group * @return Gnkw\Http\Resource */ protected function selectGroup($id) { if ($this->resetGroup) { $reset = 'true'; $this->resetGroup = false; } else { $reset = 'false'; } $url = new Uri('/standard/gui/tree.jsp'); $url->addParam('selectId', $id); $url->addParam('reset', $reset); $url->addParam('forceLoad', 'false'); $url->addParam('scroll', 0); $request = $this->client->get($url); $cookies = array(); if (isset($this->cookies['JSESSIONID'])) { $cookies['JSESSIONID'] = $this->cookies['JSESSIONID']; } $request->setCookies($cookies); $response = $request->getResource(); $this->filterateCookies($response); return $response; }