PHP Class Happyr\LinkedIn\Http\UrlGenerator

Author: Tobias Nyholm ([email protected])
Inheritance: implements Happyr\LinkedIn\Http\UrlGeneratorInterface
Show file Open project: happyr/linkedin-api-client

Public Properties

Property Type Description
$domainMap domainMap Maps aliases to LinkedIn domains.
$knownLinkedInParams knownLinkedInParams A list of params that might be in the query string

Protected Properties

Property Type Description
$trustForwarded boolean Indicates if we trust HTTP_X_FORWARDED_* headers.

Public Methods

Method Description
getCurrentUrl ( )
getUrl ( $name, $path = '', $params = [] )
setTrustForwarded ( $trustForwarded )

Protected Methods

Method Description
dropLinkedInParams ( string $query ) : string Drop known LinkedIn params. Ie those in self::$knownLinkeInParams.
getHttpHost ( ) : mixed Get the host.
getHttpProtocol ( ) : string Get the protocol.

Method Details

dropLinkedInParams() protected method

Drop known LinkedIn params. Ie those in self::$knownLinkeInParams.
protected dropLinkedInParams ( string $query ) : string
$query string
return string query without LinkedIn params. This string is prepended with a question mark '?'

getCurrentUrl() public method

public getCurrentUrl ( )

getHttpHost() protected method

Get the host.
protected getHttpHost ( ) : mixed
return mixed

getHttpProtocol() protected method

Get the protocol.
protected getHttpProtocol ( ) : string
return string

getUrl() public method

public getUrl ( $name, $path = '', $params = [] )

setTrustForwarded() public method

public setTrustForwarded ( $trustForwarded )

Property Details

$domainMap public static property

domainMap Maps aliases to LinkedIn domains.
public static $domainMap

$knownLinkedInParams public static property

knownLinkedInParams A list of params that might be in the query string
public static $knownLinkedInParams

$trustForwarded protected property

Indicates if we trust HTTP_X_FORWARDED_* headers.
protected bool $trustForwarded
return boolean