private function visitOuterObject(
        Parameter $model,
        ResultInterface $result,
        ResponseInterface $response,
        array &$context
    ) {
        $parentLocation = $model->getLocation();

        // If top-level additionalProperties is a schema, then visit it
        $additional = $model->getAdditionalProperties();
        if ($additional instanceof Parameter) {
            // Use the model location if none set on additionalProperties.
            $location = $additional->getLocation() ?: $parentLocation;
            $result = $this->triggerBeforeVisitor($location, $model, $result, $response, $context);
        }

        // Use 'location' from all individual defined properties, but fall back
        // to the model location if no per-property location is set. Collect
        // the properties that need to be visited into an array.
        $visitProperties = [];
        foreach ($model->getProperties() as $schema) {
            $location = $schema->getLocation() ?: $parentLocation;
            if ($location) {
                $visitProperties[] = [$location, $schema];
                // Trigger the before method on each unique visitor location
                if (!isset($context['visitors'][$location])) {
                    $result = $this->triggerBeforeVisitor($location, $model, $result, $response, $context);
                }
            }
        }

        // Actually visit each response element
        foreach ($visitProperties as $property) {
            $result = $this->responseLocations[$property[0]]->visit($result, $response, $property[1]);
        }

        return $result;
    }
private function visitOuterObject(
        Parameter $model,
        ResultInterface $result,
        ResponseInterface $response,
        array &$context
    ) {
        $parentLocation = $model->getLocation();

        // If top-level additionalProperties is a schema, then visit it
        $additional = $model->getAdditionalProperties();
        if ($additional instanceof Parameter) {
            // Use the model location if none set on additionalProperties.
            $location = $additional->getLocation() ?: $parentLocation;
            $result = $this->triggerBeforeVisitor($location, $model, $result, $response, $context);
        }

        // Use 'location' from all individual defined properties, but fall back
        // to the model location if no per-property location is set. Collect
        // the properties that need to be visited into an array.
        $visitProperties = [];
        foreach ($model->getProperties() as $schema) {
            $location = $schema->getLocation() ?: $parentLocation;
            if ($location) {
                $visitProperties[] = [$location, $schema];
                // Trigger the before method on each unique visitor location
                if (!isset($context['visitors'][$location])) {
                    $result = $this->triggerBeforeVisitor($location, $model, $result, $response, $context);
                }
            }
        }

        // Actually visit each response element
        foreach ($visitProperties as $property) {
            $result = $this->responseLocations[$property[0]]->visit($result, $response, $property[1]);
        }

        return $result;
    }
private function visitOuterObject ( Parameter $ model , ResultInterface $ result , ResponseInterface $ response , array & $ context ) { $ parentLocation = $ model -> getLocation ( ) ; // If top-level additionalProperties is a schema, then visit it $ additional = $ model -> getAdditionalProperties ( ) ; if ( $ additional instanceof Parameter ) { // Use the model location if none set on additionalProperties. $ location = $ additional -> getLocation ( ) ? : $ parentLocation ; $ result = $ this -> triggerBeforeVisitor ( $ location , $ model , $ result , $ response , $ context ) ; } // Use 'location' from all individual defined properties, but fall back // to the model location if no per-property location is set. Collect // the properties that need to be visited into an array. $ visitProperties = [ ] ; foreach ( $ model -> getProperties ( ) as $ schema ) { $ location = $ schema -> getLocation ( ) ? : $ parentLocation ; if ( $ location ) { $ visitProperties [ ] = [ $ location , $ schema ] ; // Trigger the before method on each unique visitor location if ( ! isset ( $ context [ 'visitors' ] [ $ location ] ) ) { $ result = $ this -> triggerBeforeVisitor ( $ location , $ model , $ result , $ response , $ context ) ; } } } // Actually visit each response element foreach ( $ visitProperties as $ property ) { $ result = $ this -> responseLocations [ $ property [ 0 ] ] -> visit ( $ result , $ response , $ property [ 1 ] ) ; } return $ result ; }
Visits the outer object

@param Parameter         $model
@param ResultInterface   $result
@param ResponseInterface $response
@param array             $context
@return ResultInterface
Visits the outer object