Cheetah
Public Member Functions | Protected Member Functions | List of all members
Facebook\Url\FacebookUrlDetectionHandler Class Reference
Inheritance diagram for Facebook\Url\FacebookUrlDetectionHandler:
Facebook\Url\UrlDetectionInterface

Public Member Functions

 getCurrentUrl ()
 

Protected Member Functions

 getHttpScheme ()
 
 isBehindSsl ()
 
 protocolWithActiveSsl ($protocol)
 
 getHostName ()
 
 getCurrentPort ()
 
 getServerVar ($key)
 
 getHeader ($key)
 
 isValidForwardedHost ($header)
 

Detailed Description

Definition at line 31 of file FacebookUrlDetectionHandler.php.

Member Function Documentation

◆ getCurrentPort()

Facebook\Url\FacebookUrlDetectionHandler::getCurrentPort ( )
protected

Definition at line 125 of file FacebookUrlDetectionHandler.php.

◆ getCurrentUrl()

Facebook\Url\FacebookUrlDetectionHandler::getCurrentUrl ( )

Get the currently active URL.

Returns
string

Implements Facebook\Url\UrlDetectionInterface.

Definition at line 36 of file FacebookUrlDetectionHandler.php.

◆ getHeader()

Facebook\Url\FacebookUrlDetectionHandler::getHeader (   $key)
protected

Gets a value from the HTTP request headers.

Parameters
string$key
Returns
string

Definition at line 160 of file FacebookUrlDetectionHandler.php.

◆ getHostName()

Facebook\Url\FacebookUrlDetectionHandler::getHostName ( )
protected

Tries to detect the host name of the server.

Some elements adapted from

See also
https://github.com/symfony/HttpFoundation/blob/master/Request.php
Returns
string

Definition at line 95 of file FacebookUrlDetectionHandler.php.

◆ getHttpScheme()

Facebook\Url\FacebookUrlDetectionHandler::getHttpScheme ( )
protected

Get the currently active URL scheme.

Returns
string

Definition at line 46 of file FacebookUrlDetectionHandler.php.

◆ getServerVar()

Facebook\Url\FacebookUrlDetectionHandler::getServerVar (   $key)
protected

Returns the a value from the $_SERVER super global.

Parameters
string$key
Returns
string

Definition at line 148 of file FacebookUrlDetectionHandler.php.

◆ isBehindSsl()

Facebook\Url\FacebookUrlDetectionHandler::isBehindSsl ( )
protected

Tries to detect if the server is running behind an SSL.

Returns
boolean

Definition at line 56 of file FacebookUrlDetectionHandler.php.

◆ isValidForwardedHost()

Facebook\Url\FacebookUrlDetectionHandler::isValidForwardedHost (   $header)
protected

Checks if the value in X_FORWARDED_HOST is a valid hostname Could prevent unintended redirections

Parameters
string$header
Returns
boolean

Definition at line 173 of file FacebookUrlDetectionHandler.php.

◆ protocolWithActiveSsl()

Facebook\Url\FacebookUrlDetectionHandler::protocolWithActiveSsl (   $protocol)
protected

Detects an active SSL protocol value.

Parameters
string$protocol
Returns
boolean

Definition at line 79 of file FacebookUrlDetectionHandler.php.


The documentation for this class was generated from the following file: