SearchResult
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
Constants
| STATUS_REGISTERED | 
 | 
| STATUS_NOT_REGISTERED | 
 | 
| STATUS_RESERVED | 
 | 
| STATUS_UNKNOWN | 
 | 
| STATUS_TLD_NOT_SUPPORTED | 
 | 
Properties summary
| Type | Property | Description | |
|---|---|---|---|
| protected | $score | ||
| protected | $premiumCostPricing | ||
| protected | $status | 
Methods summary
| Return Type | Method Name | Description | |
|---|---|---|---|
| __construct(string $sld, string $tld) | Construct an object which will express the response of a domain lookup | ||
| static SearchResult | factoryFromDomain(Domain $domain) | Factory a SearchResult from a regular domain instance | |
| $this | setScore(float $score) | Set the "score" of this domain compared to the original search query | |
| float | getScore() | The "score" of this domain compared to the original search query | |
| setPremiumCostPricing(array $pricing = []) | Set Premium Cost Pricing. | ||
| array | getPremiumCostPricing() | Get Premium Cost Pricing. | |
| bool | isAvailableForPurchase() | Whether the domain is generally available for purchase | |
| bool | isMatchingLengthRequirements() | Checks whether the domain matches length requirements | |
| $this | setStatus(string $status) | Set availability status | |
| string | getStatus() | Get availability status | |
| string | getLegacyStatus() | Determine legacy status value (pre WHMCS 6.0 logic) | |
| array | toArray() | - | |
| pricing() | - | ||
| DomainPricing | calculatePremiumPricing() | Calculate Premium Pricing with Markup. | 
Details
                            
    __construct (string $sld, string $tld)
        
    
    Construct an object which will express the response of a domain lookup
                static            SearchResult
    factoryFromDomain (Domain $domain)
        
    
    Factory a SearchResult from a regular domain instance
                            $this
    setScore (float $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
                            float
    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
                            
    setPremiumCostPricing (array $pricing = [])
        
    
    Set Premium Cost Pricing.
                            array
    getPremiumCostPricing ()
        
    
    Get Premium Cost Pricing.
                            bool
    isAvailableForPurchase ()
        
    
    Whether the domain is generally available for purchase
                            bool
    isMatchingLengthRequirements ()
        
    
    Checks whether the domain matches length requirements
                            $this
    setStatus (string $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.
                            string
    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.
                            string
    getLegacyStatus ()
        
    
    Determine legacy status value (pre WHMCS 6.0 logic)
                            array
    toArray ()
        
    
    
                            
    pricing ()
        
    
    
                    protected        DomainPricing
    calculatePremiumPricing ()
        
    
    Calculate Premium Pricing with Markup.