Overview

Namespaces

  • Composer
    • Autoload
  • Geekwright
    • RegDom
  • League
    • OAuth2
      • Client
        • Provider
  • None
  • Xmf
    • Database
    • Jwt
    • Key
    • Module
      • Helper

Classes

  • PublicSuffixList
  • RegisteredDomain
  • Overview
  • Namespace
  • Class
  • Tree

Class RegisteredDomain

Class RegisteredDomain

Determine the registrable domain portion of a URL, respecting the public suffix list conventions

Namespace: Geekwright\RegDom
Package: Geekwright\RegDom
License: License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
Author: Florian Sager, 06.08.2008, sager@agitos.de
Author: Marcus Bointon (https://github.com/Synchro/regdom-php)
Author: Richard Griffith richard@geekwright.com
Located at lass/libraries/vendor/geekwright/regdom/src/RegisteredDomain.php
Methods summary
public
# __construct( Geekwright\RegDom\PublicSuffixList $psl = null )

RegisteredDomain constructor.

RegisteredDomain constructor.

Parameters

$psl
PublicSuffixList object, or null to use defaults
protected string
# normalizeHost( string $url )

Given a URL or bare host name, return a normalized host name, converting punycode to UTF-8 and converting to lower case

Given a URL or bare host name, return a normalized host name, converting punycode to UTF-8 and converting to lower case

Parameters

$url
URL or host name

Returns

string
protected string
# convertPunycode( string $part )

Convert a punycode string to UTF-8 if needed

Convert a punycode string to UTF-8 if needed

Parameters

$part
host component

Returns

string
host component as UTF-8
protected string
# decodePunycode( string $encoded )

convert punycode to UTF-8 (the hard way) Used only if idn_to_utf8() is not available

convert punycode to UTF-8 (the hard way) Used only if idn_to_utf8() is not available

This fallback adapted from https://ckon.wordpress.com/2010/08/24/punycode-to-unicode-converter-php/

Parameters

$encoded

Returns

string
public string|null
# getRegisteredDomain( string $host )

Determine the registered domain portion of the supplied host string

Determine the registered domain portion of the supplied host string

Parameters

$host
a host name or URL containing a host name

Returns

string|null
shortest registrable domain portion of the supplied host or null if invalid
protected null|string
# findRegisteredDomain( string[] $remainingSigningDomainParts, string[] & $treeNode )

Recursive helper method to query the PSL tree

Recursive helper method to query the PSL tree

Parameters

$remainingSigningDomainParts
parts of domain being queried
$treeNode
subset of tree array by reference

Returns

null|string
Properties summary
protected $tree
#
protected $psl
#
API documentation generated by ApiGen