Skip to content

support all RFC5731 status fields from EPP schema #397

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
Feb 27, 2025

Conversation

MikeAT
Copy link
Contributor

@MikeAT MikeAT commented Sep 20, 2024

This PR adds support for all status fields (name, language and message) from RFC5731 :

   <!--
   Status is a combination of attributes and an optional
   human-readable message that may be expressed in languages other
   than English.
   -->
   <complexType name="statusType">
    <simpleContent>
      <extension base="normalizedString">
        <attribute name="s" type="domain:statusValueType"
         use="required"/>
        <attribute name="lang" type="language"
         default="en"/>
      </extension>
    </simpleContent>
   </complexType>

To set a status with a message, create a eppStatus object:

$domain->addStatus(new eppStatus(eppDomain::STATUS_CLIENT_HOLD,'en','Payment overdue.'));

setting the status as string still works to not break any running implementations:

$domain->addStatus(eppDomain::STATUS_CLIENT_HOLD);

To receive the status objects on a domain set the parameter $fullobjects=true on the getStatuses-method.

   foreach ($d->getStatuses(true) as $status) {
            echo "  ".$status->getStatusname()." " .$status->getMessage()."\n";
        }

if not set or set to false, the statuses are returned as an array of strings like in the current implementation.

@MikeAT
Copy link
Contributor Author

MikeAT commented Jan 30, 2025

@metaregistrar any chance to get this merged?

@metaregistrar metaregistrar merged commit ca29622 into metaregistrar:master Feb 27, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants