Class · extends Domain
Search results from a domain lookup query
Contains the data of a domain and information about it potential availability Also can potentially get a list of like-domain suggests
| Name | Description |
|---|---|
STATUS_REGISTERED | |
STATUS_NOT_REGISTERED | |
STATUS_RESERVED | |
STATUS_UNKNOWN | |
STATUS_TLD_NOT_SUPPORTED |
public function __construct($sld, $tld)Construct an object which will express the response of a domain lookup
Parameters
| Type | Name | Description |
|---|---|---|
string | $sld | |
string | $tld |
public static function factoryFromDomain(Domain $domain)Factory a SearchResult from a regular domain instance
Parameters
| Type | Name | Description |
|---|---|---|
Domain | $domain |
Returns SearchResult
public function setScore($score)Set the "score" of this domain compared to the original search query
If the search query the same as what this instance is about, the "score" would be 1.0
Parameters
| Type | Name | Description |
|---|---|---|
float | $score |
Returns $this
public function getScore()The "score" of this domain compared to the original search query
If this instance represents the exact search query, the "score" should be 1.0
Returns float
public function setPremiumCostPricing($pricing = [])Set Premium Cost Pricing.
Parameters
| Type | Name | Description |
|---|---|---|
array | $pricing |
public function getPremiumCostPricing()Get Premium Cost Pricing.
Returns array
public function isAvailableForPurchase()Whether the domain is generally available for purchase
Returns bool
public function isMatchingLengthRequirements()Checks whether the domain matches length requirements
Returns bool
public function setStatus($status)Set availability status
There are several status, each a constant of this class. It is up to the provider that is manifesting this object to choose the correct one; it is up to the caller that is using this object to interpret that status.
Parameters
| Type | Name | Description |
|---|---|---|
string | $status |
Returns $this
public function getStatus()Get availability status
There are several status, each a constant of this class. It is up to the provider that is manifesting this object to choose the correct one; it is up to the caller that is using this object to interpret that status.
Returns string
public function getLegacyStatus()Determine legacy status value (pre WHMCS 6.0 logic)
Returns string
public function toArray()Returns array
public function validateDomainName(): ?stringReturns string — Return validation error message. If domain is valid return null
public function pricing()