metaregistrar / php-epp-client

Object-oriented PHP EPP Client
https://www.metaregistrar.com/docs/
MIT License
214 stars 159 forks source link

extend eppRequest #129

Closed alesf closed 6 years ago

alesf commented 6 years ago

Verisign extension namestoreExt-1.1 is required for all Domain, Contact and Host requests. I'm trying to find a way to add the extension without redeclaring all of the requests. Is there a way of doing this?

metaregistrar commented 6 years ago

The normal way would be to add the extension to the folder Protocols/EPP/eppExtensions, where also all other extensions are.

In the includes.php you can determine which functions you will override. See for example authInfo-1.1/includes.php, it only overrides the eppInfoDomainRequest and eppInfoDomainResponse with euridEppInfoDomainRequest and euridEppInfoDomainResponse.

alesf commented 6 years ago

That I know. It doesn't seem right redefining most of the requests just to extend the new customEppRequest class so I'm searching for a simpler and more elegant solution and I can't think of anything.

metaregistrar commented 6 years ago

Problem is, if the request adds information to the XML that is sent or received - you will need to create a new request to append the original request. No other way around it, i'm afraid. Same goes for the responses.

alesf commented 6 years ago

OK. No problem.