Documentation

LogoutUrlGenerator
in package

Provides generator functions for the logout URL.

Tags
author

Fabien Potencier fabien@symfony.com

author

Jeremy Mikola jmikola@gmail.com

Table of Contents

Properties

$currentFirewallContext  : string|null
$currentFirewallName  : string|null
$listeners  : array<string|int, mixed>
$requestStack  : mixed
$router  : mixed
$tokenStorage  : mixed

Methods

__construct()  : mixed
getLogoutPath()  : string
Generates the absolute logout path for the firewall.
getLogoutUrl()  : string
Generates the absolute logout URL for the firewall.
registerListener()  : mixed
Registers a firewall's LogoutListener, allowing its URL to be generated.
setCurrentFirewall()  : mixed
generateLogoutUrl()  : string
Generates the logout URL for the firewall.
getListener()  : array<string|int, mixed>

Properties

Methods

getLogoutPath()

Generates the absolute logout path for the firewall.

public getLogoutPath([string $key = null ]) : string
Parameters
$key : string = null
Return values
string

getLogoutUrl()

Generates the absolute logout URL for the firewall.

public getLogoutUrl([string $key = null ]) : string
Parameters
$key : string = null
Return values
string

registerListener()

Registers a firewall's LogoutListener, allowing its URL to be generated.

public registerListener(string $key, string $logoutPath, string|null $csrfTokenId, string|null $csrfParameter[, CsrfTokenManagerInterface $csrfTokenManager = null ][, string|null $context = null ]) : mixed
Parameters
$key : string

The firewall key

$logoutPath : string

The path that starts the logout process

$csrfTokenId : string|null

The ID of the CSRF token

$csrfParameter : string|null

The CSRF token parameter name

$csrfTokenManager : CsrfTokenManagerInterface = null
$context : string|null = null

The listener context

setCurrentFirewall()

public setCurrentFirewall(string|null $key[, string $context = null ]) : mixed
Parameters
$key : string|null
$context : string = null

generateLogoutUrl()

Generates the logout URL for the firewall.

private generateLogoutUrl(string|null $key, int $referenceType) : string
Parameters
$key : string|null
$referenceType : int
Return values
string

getListener()

private getListener(string|null $key) : array<string|int, mixed>
Parameters
$key : string|null
Tags
throws
InvalidArgumentException

if no LogoutListener is registered for the key or could not be found automatically

Return values
array<string|int, mixed>

        
On this page

Search results