SimpleSAML_Utilities::getSelfHost PHP 메소드

getSelfHost() 공개 정적인 메소드

사용 중단: This method will be removed in SSP 2.0. Please use SimpleSAML\Utils\HTTP::getSelfHost() instead.
public static getSelfHost ( )
    public static function getSelfHost()
    {
        return \SimpleSAML\Utils\HTTP::getSelfHost();
    }

Usage Example

 private function generateDynamicHostedEntityID($set)
 {
     /* Get the configuration. */
     $config = SimpleSAML_Configuration::getInstance();
     $baseurl = SimpleSAML_Utilities::selfURLhost() . '/' . $config->getBaseURL();
     if ($set === 'saml20-idp-hosted') {
         return $baseurl . 'saml2/idp/metadata.php';
     } elseif ($set === 'saml20-sp-hosted') {
         return $baseurl . 'saml2/sp/metadata.php';
     } elseif ($set === 'shib13-idp-hosted') {
         return $baseurl . 'shib13/idp/metadata.php';
     } elseif ($set === 'shib13-sp-hosted') {
         return $baseurl . 'shib13/sp/metadata.php';
     } elseif ($set === 'wsfed-sp-hosted') {
         return 'urn:federation:' . SimpleSAML_Utilities::getSelfHost();
     } else {
         throw new Exception('Can not generate dynamic EntityID for metadata of this type: [' . $set . ']');
     }
 }
All Usage Examples Of SimpleSAML_Utilities::getSelfHost