/** * @param array $response */ public function __construct(array $response) { foreach (['api_access_point', 'web_access_point'] as $f) { if (Util::array_found($response, $f)) { $this->{$f} = $response[$f]; } } $this->response = $response; }