Skip to content

#361 Adding the ability to use absolute domain #362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 22, 2025
Merged

Conversation

nyamsprod
Copy link
Collaborator

Resolve issue #361 by adding:

  • DomainName::withRootLabel();
  • DomainName::withoutRootLabel();
  • DomainName::isAbsolute();

The resolution API does not change but the resolve now can also resolve absolute domain:

<?php

$result = $publicSuffixList->resolve('private.ulb.ac.be.');
$result->suffix()->toString();                     // returns 'ac.be'
$result->domain()->toString();                     // returns 'private.ulb.ac.be.'
$result->registrableDomain()->toString();          // returns 'ulb.ac.be'
$result->secondLevelDomain()->toString();          // returns 'ulb'
$result->subDomain()->toString();                  // returns 'private'
$result->domain()->isAbsolute();                   // returns true
$result->domain()->withoutRootLabel()->toString(); // returns 'private.ulb.ac.be'

@nyamsprod nyamsprod self-assigned this Apr 22, 2025
@nyamsprod nyamsprod merged commit e4f8435 into develop Apr 22, 2025
16 checks passed
@nyamsprod nyamsprod deleted the bugfix/issue-361 branch April 22, 2025 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant