LaravelFCM\Response\BaseResponse::__construct PHP Method

__construct() public method

BaseResponse constructor.
public __construct ( Response $response )
$response GuzzleHttp\Psr7\Response
    public function __construct(GuzzleResponse $response)
    {
        $this->isJsonResponse($response);
        $responseInJson = json_decode($response->getBody(), true);
        $this->parseResponse($responseInJson);
    }

Usage Example

 /**
  * DownstreamResponse constructor.
  *
  * @param GuzzleResponse $response
  * @param                $tokens
  */
 public function __construct(GuzzleResponse $response, $tokens)
 {
     $this->tokens = is_string($tokens) ? [$tokens] : $tokens;
     parent::__construct($response);
 }
All Usage Examples Of LaravelFCM\Response\BaseResponse::__construct