protected function setPerson($response) { $personObject = new Person(); $personObject->loadFromResponse($response); $this->person = $personObject; }
/** * @param $tinderIdentifier * @return Person */ public function getPerson($tinderIdentifier) { $guzzleResponse = $this->guzzleClient->get('/user/' . $tinderIdentifier, []); if ($guzzleResponse->getBody()) { $response = $guzzleResponse->json(); $person = new Person($this->guzzleClient); $person->loadFromResponse($response['results']); // Do something with Status? return $person; } }