Skip to content
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

support all RFC5731 status fields from EPP schema #397

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MikeAT
Copy link

@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.

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