PHP Interface Sulu\Component\Webspace\Analyzer\RequestAnalyzerInterface

Show file Open project: sulu/sulu Interface Usage Examples

Public Methods

Method Description
analyze ( Request $request ) Analyzes the current request, and saves the values for portal, language, country and segment for further usage.
getAnalyticsKey ( ) : string Returns the analytics key.
getAttribute ( string $name, mixed | null $default = null ) : mixed Returns request attribute with given name.
getCurrentLocalization ( ) : Localization Returns the current localization for this Request.
getGetParameters ( ) : array Returns the get parameters.
getMatchType ( ) : integer Returns the current match type for this request.
getPortal ( ) : Portal Returns the current portal for this request.
getPortalInformation ( ) : PortalInformation Returns portal-information of request.
getPortalUrl ( ) : string Returns the url of the current portal.
getPostParameters ( ) : array Returns the post parameters.
getRedirect ( ) : string Returns the redirect url.
getResourceLocator ( ) : string Returns the path of the current request, which is the url without host, language and so on.
getResourceLocatorPrefix ( ) : string Returns the prefix required before the resource locator.
getSegment ( ) : Segment Returns the current segment for this request.
getWebspace ( ) : Webspace Returns the current webspace for this request.
validate ( Request $request ) Validates the data written on the given request and throws exceptions in case something is wrong or missing.

Method Details

analyze() public method

Analyzes the current request, and saves the values for portal, language, country and segment for further usage.
public analyze ( Request $request )
$request Symfony\Component\HttpFoundation\Request The request to analyze

getAnalyticsKey() public method

Returns the analytics key.
public getAnalyticsKey ( ) : string
return string

getAttribute() public method

Returns request attribute with given name.
public getAttribute ( string $name, mixed | null $default = null ) : mixed
$name string
$default mixed | null
return mixed

getCurrentLocalization() public method

Returns the current localization for this Request.
public getCurrentLocalization ( ) : Localization
return Sulu\Component\Localization\Localization

getGetParameters() public method

Returns the get parameters.
public getGetParameters ( ) : array
return array

getMatchType() public method

Returns the current match type for this request.
public getMatchType ( ) : integer
return integer

getPortal() public method

Returns the current portal for this request.
public getPortal ( ) : Portal
return Sulu\Component\Webspace\Portal

getPortalInformation() public method

Returns portal-information of request.
public getPortalInformation ( ) : PortalInformation
return Sulu\Component\Webspace\PortalInformation

getPortalUrl() public method

Returns the url of the current portal.
public getPortalUrl ( ) : string
return string

getPostParameters() public method

Returns the post parameters.
public getPostParameters ( ) : array
return array

getRedirect() public method

Returns the redirect url.
public getRedirect ( ) : string
return string

getResourceLocator() public method

Returns the path of the current request, which is the url without host, language and so on.
public getResourceLocator ( ) : string
return string

getResourceLocatorPrefix() public method

Returns the prefix required before the resource locator.
public getResourceLocatorPrefix ( ) : string
return string

getSegment() public method

Returns the current segment for this request.
public getSegment ( ) : Segment
return Sulu\Component\Webspace\Segment

getWebspace() public method

Returns the current webspace for this request.
public getWebspace ( ) : Webspace
return Sulu\Component\Webspace\Webspace

validate() public method

Validates the data written on the given request and throws exceptions in case something is wrong or missing.
public validate ( Request $request )
$request Symfony\Component\HttpFoundation\Request