Пример #1
0
 protected function setPerson($response)
 {
     $personObject = new Person();
     $personObject->loadFromResponse($response);
     $this->person = $personObject;
 }
Пример #2
0
 /**
  * @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;
     }
 }