public static function getBinding(string $urn) : Binding
    {
        switch ($urn) {
            case Constants::BINDING_HTTP_POST:
                return new HTTPPost();
            case Constants::BINDING_HTTP_REDIRECT:
                return new HTTPRedirect();
            case Constants::BINDING_HTTP_ARTIFACT:
                return new HTTPArtifact();
            case Constants::BINDING_HOK_SSO:
                return new HTTPPost();
            // ECP ACS is defined with the PAOS binding, but as the IdP, we
            // talk to the ECP using SOAP -- if support for ECP as an SP is
            // implemented, this logic may need to change
            case Constants::BINDING_PAOS:
                return new SOAP();
            default:
                throw new \Exception('Unsupported binding: '.var_export($urn, true));
        }
    }
public static function getBinding(string $urn) : Binding
    {
        switch ($urn) {
            case Constants::BINDING_HTTP_POST:
                return new HTTPPost();
            case Constants::BINDING_HTTP_REDIRECT:
                return new HTTPRedirect();
            case Constants::BINDING_HTTP_ARTIFACT:
                return new HTTPArtifact();
            case Constants::BINDING_HOK_SSO:
                return new HTTPPost();
            // ECP ACS is defined with the PAOS binding, but as the IdP, we
            // talk to the ECP using SOAP -- if support for ECP as an SP is
            // implemented, this logic may need to change
            case Constants::BINDING_PAOS:
                return new SOAP();
            default:
                throw new \Exception('Unsupported binding: '.var_export($urn, true));
        }
    }
public static function getBinding ( string $ urn ) : Binding { switch ( $ urn ) { case Constants :: BINDING_HTTP_POST : return new HTTPPost ( ) ; case Constants :: BINDING_HTTP_REDIRECT : return new HTTPRedirect ( ) ; case Constants :: BINDING_HTTP_ARTIFACT : return new HTTPArtifact ( ) ; case Constants :: BINDING_HOK_SSO : return new HTTPPost ( ) ; // ECP ACS is defined with the PAOS binding, but as the IdP, we // talk to the ECP using SOAP -- if support for ECP as an SP is // implemented, this logic may need to change case Constants :: BINDING_PAOS : return new SOAP ( ) ; default : throw new \ Exception ( 'Unsupported binding: ' . var_export ( $ urn , true ) ) ; } }
Retrieve a binding with the given URN.

Will throw an exception if it is unable to locate the binding.

@param string $urn The URN of the binding.
@throws \Exception
@return \SAML2\Binding The binding.
Retrieve a binding with the given URN .