ClientFactory
class ClientFactory (View source)
ClientFactory
Typed named constructors for each supported registrar brand. Each returns the
concrete brand client, fully typed, so every capability that brand supports —
shared (credentials, referer, user-agent, proxy, logging, OT&E/LIVE switching,
request($cmd, $path)) and brand-specific alike — is available directly, with
no assert/instanceof narrowing for the normal path:
- {\CNIC\cnr()} yields a {\CNIC\CNR\SessionClient} with CNR session
handling (
getSession()/setSession()/login()/logout()/saveSession()) and role credentials (setRoleCredentials(), from {\CNIC\RoleCredentialsInterface}). - {\CNIC\ibs()}/{@see \CNIC\moniker()} yield the plain brand {\CNIC\IBS\Client} / {\CNIC\MONIKER\Client}. Those platforms have no session or role-credential concept, so those methods are genuinely absent — calling one is a static analysis error at the call site, not a runtime surprise. Keep it that way: a stub that accepts a session id and discards it is worse than no method at all.
All further configuration — credentials, referer, user-agent, proxy, logging and OT&E/sandbox mode — is the caller's responsibility via the client's fluent setters. This keeps the SDK platform-agnostic and transport-faithful: the caller normalizes input (e.g. HTML-entity decoding of WHMCS-stored passwords) before handing it to the client.
Methods
CentralNic Reseller (CNR, fka RRPproxy) client.
Details
static SessionClient
cnr()
CentralNic Reseller (CNR, fka RRPproxy) client.
static Client
ibs()
Internet.bs (IBS) client.
static Client
moniker()
Moniker client (same platform as IBS; only the endpoints differ).