%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/o91-api/vendor/nexmo/client/src/Client/Response/
Upload File :
Create Path :
Current File : /var/www/html/o91-api/vendor/nexmo/client/src/Client/Response/Response.php

<?php
/**
 * Nexmo Client Library for PHP
 *
 * @copyright Copyright (c) 2016 Nexmo, Inc. (http://nexmo.com)
 * @license   https://github.com/Nexmo/nexmo-php/blob/master/LICENSE.txt MIT License
 */

namespace Nexmo\Client\Response;

class Response extends AbstractResponse implements ResponseInterface
{
    /**
     * Allow specific responses to easily define required parameters.
     * @var array
     */
    protected $expected = array();

    public function __construct(array $data)
    {
        $keys = array_keys($data);
        $missing = array_diff($this->expected, $keys);

        if($missing){
            throw new \RuntimeException('missing expected response keys: ' . implode(', ', $missing));
        }

        $this->data = $data;
    }
}

Zerion Mini Shell 1.0