Prose\ExpectsHttpResponse::__construct PHP Method

__construct() public method

Although it is extra work for us, if we use typehinting here, then we get a failure in the PHP engine (which is harder to handle). It's currently considered to be better if we detect the error ourselves.
public __construct ( StoryTeller $st, $params )
$st DataSift\Storyplayer\PlayerLib\StoryTeller [description]
    public function __construct(StoryTeller $st, $params)
    {
        // do we HAVE a valid response?
        if (!isset($params[0])) {
            throw new E5xx_ExpectFailed(__METHOD__, "HttpClientResponse object", "missing object");
        }
        $response = $params[0];
        if (!is_object($response)) {
            throw new E5xx_ExpectFailed(__METHOD__, "HttpClientResponse object", gettype($response));
        }
        if (!$response instanceof HttpClientResponse) {
            throw new E5xx_ExpectFailed(__METHOD__, "HttpClientResponse object", get_class($response));
        }
        // call our parent constructor
        parent::__construct($st, array($response));
    }