public function getAggregateActualResponses($key = null, $operationId = null, $types = ['headers', 'body'])
    {
        if ($this->valid && isset($this->aggregateActualResponses)) {
            if (null !== $key) {
                foreach ($types as $type) {
                    if (null !== $operationId) {
                        if (isset($this->aggregateActualResponses[$operationId][$type][$key])) {
                            return $this->aggregateActualResponses[$operationId][$type][$key];
                        }
                    } else {
                        foreach (array_reverse($this->aggregateActualResponses) as $values) {
                            if (isset($values[$type][$key])) {
                                return $values[$type][$key];
                            }
                        }
                    }
                }
            } else {
                // Get the entire result, separated by types.
                $result = [];
                foreach ($types as $type) {
                    if (isset($this->aggregateActualResponses[$operationId][$type])) {
                        $result[$type] = $this->aggregateActualResponses[$operationId][$type];
                    }
                }

                return $result;
            }
        }

        return null;
    }
public function getAggregateActualResponses($key = null, $operationId = null, $types = ['headers', 'body'])
    {
        if ($this->valid && isset($this->aggregateActualResponses)) {
            if (null !== $key) {
                foreach ($types as $type) {
                    if (null !== $operationId) {
                        if (isset($this->aggregateActualResponses[$operationId][$type][$key])) {
                            return $this->aggregateActualResponses[$operationId][$type][$key];
                        }
                    } else {
                        foreach (array_reverse($this->aggregateActualResponses) as $values) {
                            if (isset($values[$type][$key])) {
                                return $values[$type][$key];
                            }
                        }
                    }
                }
            } else {
                // Get the entire result, separated by types.
                $result = [];
                foreach ($types as $type) {
                    if (isset($this->aggregateActualResponses[$operationId][$type])) {
                        $result[$type] = $this->aggregateActualResponses[$operationId][$type];
                    }
                }

                return $result;
            }
        }

        return null;
    }
public function getAggregateActualResponses ( $ key = null , $ operationId = null , $ types = [ 'headers' , 'body' ] ) { if ( $ this -> valid && isset ( $ this -> aggregateActualResponses ) ) { if ( null !== $ key ) { foreach ( $ types as $ type ) { if ( null !== $ operationId ) { if ( isset ( $ this -> aggregateActualResponses [ $ operationId ] [ $ type ] [ $ key ] ) ) { return $ this -> aggregateActualResponses [ $ operationId ] [ $ type ] [ $ key ] ; } } else { foreach ( array_reverse ( $ this -> aggregateActualResponses ) as $ values ) { if ( isset ( $ values [ $ type ] [ $ key ] ) ) { return $ values [ $ type ] [ $ key ] ; } } } } } else { // Get the entire result, separated by types. $ result = [ ] ; foreach ( $ types as $ type ) { if ( isset ( $ this -> aggregateActualResponses [ $ operationId ] [ $ type ] ) ) { $ result [ $ type ] = $ this -> aggregateActualResponses [ $ operationId ] [ $ type ] ; } } return $ result ; } } return null ; }
Get the most recent non-empty response value by field name, ignoring validity.
Provide key, or operationId or both.

@param string $key
@param int    $operationId
@param array  $types       Types to check for (header/body/etc)
Get the most recent non - empty response value by field name ignoring validity . Provide key or operationId or both .