/** * @param AbstractClient $client * @param string $itemClassName * @param string $path * @throws RequestException * @throws ResponseException */ public function __construct(AbstractClient $client, $itemClassName, $path) { $this->client = $client; $this->itemClassName = $itemClassName; $this->path = $path; $this->addPage($this->client->request('GET', $this->path), 0); }
/** * @param string $identifier * @return object * @throws RequestException * @throws ResponseException */ public function findOneByIdentifier($identifier) { $result = $this->client->request('GET', $this->apiPath . '/' . $identifier); return new $this->modelClassName($result); }