/** * @param AriClient $client * @param string $response */ public function __construct(AriClient $client, $response) { $this->client = $client; parent::__construct($response); $this->application = $this->response->application; $this->timestamp = property_exists($this->response, 'timestamp') ? new \DateTime($this->response->timestamp) : null; }
/** * @param AriClient $client * @param string $response */ public function __construct(AriClient $client, $response) { $this->client = $client; parent::__construct($response); $this->application = $this->getResponseValue('application'); $this->timestamp = $this->getResponseValue('timestamp', '\\DateTime'); }