ShlinkProxy
        
        extends AbstractProxy
    
    
            
            in package
            
        
    
    
    
ShlinkProxy
Forwards a URL for shortening to shlink and stores the result.
Table of Contents
Properties
Methods
- __construct() : mixed
 - constructor
 - getError() : string
 - Returns the (untranslated) error message
 - getUrl() : string
 - Returns the shortened URL
 - isError() : bool
 - Returns true if any error has occurred
 - _extractShortUrl() : string|null
 - Extracts the short URL from the shlink API response.
 - _getProxyPayload() : array<string|int, mixed>
 - Overrides the abstract parent function to get contents from Shlink API.
 - _getProxyUrl() : string
 - Overrides the abstract parent function to get the proxy URL.
 - logErrorWithClassName() : mixed
 
Properties
$_error
error message
    private
        string
    $_error
     = ''
    
    
    
    Tags
$_url
shortened URL
    private
        string
    $_url
     = ''
    
    
    
    Tags
Methods
__construct()
constructor
    public
                    __construct(Configuration $conf, string $link) : mixed
    initializes and runs the proxy class
Parameters
- $conf : Configuration
 - $link : string
 
Tags
getError()
Returns the (untranslated) error message
    public
                    getError() : string
    Tags
Return values
stringgetUrl()
Returns the shortened URL
    public
                    getUrl() : string
    Tags
Return values
stringisError()
Returns true if any error has occurred
    public
                    isError() : bool
    Tags
Return values
bool_extractShortUrl()
Extracts the short URL from the shlink API response.
    protected
                    _extractShortUrl(array<string|int, mixed> $data) : string|null
    Parameters
- $data : array<string|int, mixed>
 
Tags
Return values
string|null_getProxyPayload()
Overrides the abstract parent function to get contents from Shlink API.
    protected
                    _getProxyPayload(Configuration $conf, string $link) : array<string|int, mixed>
    Parameters
- $conf : Configuration
 - $link : string
 
Tags
Return values
array<string|int, mixed>_getProxyUrl()
Overrides the abstract parent function to get the proxy URL.
    protected
                    _getProxyUrl(Configuration $conf) : string
    Parameters
- $conf : Configuration
 
Return values
stringlogErrorWithClassName()
    private
                    logErrorWithClassName(string $error) : mixed
    Parameters
- $error : string