Exemple #1
0
 public function __construct(PersonObjectBuilder $builder)
 {
     parent::__construct($builder->getObjectID());
     $this->globalID = $builder->getGlobalID();
     $this->displayName = $builder->getDisplayName();
     $this->profilePictureThumbnail = $builder->getProfilePictureThumbnail();
     $this->profilePicture = $builder->getProfilePicture();
     $this->language = $builder->getLanguage();
 }
Exemple #2
0
 public static function performGETPersonRequest($targetedGID)
 {
     // create an instance of PersonRequestBuilder
     $personRequest = new PersonRequestBuilder($targetedGID);
     // perform the request
     $response = $personRequest->createGETPerson()->dispatch();
     // to access contents of the response, use
     // $response->getPayload(); <-- the actual object data
     // $response->getResponseBody(); <-- the complete response body
     // return the Person object from the responses payload
     return PersonObjectBuilder::buildFromJSON($response->getPayload());
 }