SimpleSAML_Metadata_SAMLParser::parseGenericEndpoint PHP Method

parseGenericEndpoint() private static method

The returned associative array has the following elements: - 'Binding': The binding this endpoint uses. - 'Location': The URL to this endpoint. - 'ResponseLocation': The URL where responses should be sent. This may not exist. - 'index': The index of this endpoint. This attribute is only for indexed endpoints. - 'isDefault': Whether this endpoint is the default endpoint for this type. This attribute may not exist.
private static parseGenericEndpoint ( SAML2\XML\md\EndpointType $element ) : array
$element SAML2\XML\md\EndpointType The element which should be parsed.
return array An associative array with the data we have extracted from the element.
    private static function parseGenericEndpoint(\SAML2\XML\md\EndpointType $element)
    {
        $ep = array();
        $ep['Binding'] = $element->Binding;
        $ep['Location'] = $element->Location;
        if ($element->ResponseLocation !== null) {
            $ep['ResponseLocation'] = $element->ResponseLocation;
        }
        if ($element instanceof \SAML2\XML\md\IndexedEndpointType) {
            $ep['index'] = $element->index;
            if ($element->isDefault !== null) {
                $ep['isDefault'] = $element->isDefault;
            }
        }
        return $ep;
    }