Documentation

AuthFormDataManager

Adapter for managing authentication form field persistence.

Abstracts $_SESSION access for auth form data (username, email, redirect), enabling testability and session backend changes.

Tags
since
3.0.0

Table of Contents

Constants

KEY_PASSWORD_PREFIX  = 'password_'
Session key for password form data.
KEY_PREFIX  = 'auth_'
Session key prefix for auth data.

Methods

clearAll()  : void
Clear all auth form data (username, email, redirect).
clearEmail()  : void
Clear the stored email.
clearPasswordEmail()  : void
Clear the password form email.
clearRedirectUrl()  : void
Clear the stored redirect URL.
clearUsername()  : void
Clear the stored username.
getAndClearEmail()  : string
Get and clear the stored email.
getAndClearPasswordEmail()  : string
Get and clear the password form email.
getAndClearRedirectUrl()  : string
Get and clear the stored redirect URL.
getAndClearUsername()  : string
Get and clear the stored username.
getEmail()  : string
Get the stored email for form repopulation.
getPasswordEmail()  : string
Get the stored password form email.
getRedirectUrl()  : string
Get the stored redirect URL.
getUsername()  : string
Get the stored username for form repopulation.
setEmail()  : void
Set the email for form repopulation.
setPasswordEmail()  : void
Set the password form email.
setRedirectUrl()  : void
Set the redirect URL for post-login navigation.
setUsername()  : void
Set the username for form repopulation.
ensureSession()  : void
Ensure session is started.

Constants

KEY_PASSWORD_PREFIX

Session key for password form data.

private mixed KEY_PASSWORD_PREFIX = 'password_'

Methods

clearAll()

Clear all auth form data (username, email, redirect).

public clearAll() : void

clearPasswordEmail()

Clear the password form email.

public clearPasswordEmail() : void

getAndClearEmail()

Get and clear the stored email.

public getAndClearEmail() : string
Return values
string

getAndClearPasswordEmail()

Get and clear the password form email.

public getAndClearPasswordEmail() : string
Return values
string

getAndClearRedirectUrl()

Get and clear the stored redirect URL.

public getAndClearRedirectUrl([string $default = '/' ]) : string
Parameters
$default : string = '/'

Default URL if not set

Return values
string

getAndClearUsername()

Get and clear the stored username.

public getAndClearUsername() : string
Return values
string

getEmail()

Get the stored email for form repopulation.

public getEmail() : string
Return values
string

getPasswordEmail()

Get the stored password form email.

public getPasswordEmail() : string
Return values
string

getRedirectUrl()

Get the stored redirect URL.

public getRedirectUrl([string $default = '/' ]) : string
Parameters
$default : string = '/'

Default URL if not set

Return values
string

getUsername()

Get the stored username for form repopulation.

public getUsername() : string
Return values
string

setEmail()

Set the email for form repopulation.

public setEmail(string $email) : void
Parameters
$email : string

Email

setPasswordEmail()

Set the password form email.

public setPasswordEmail(string $email) : void
Parameters
$email : string

Email

setRedirectUrl()

Set the redirect URL for post-login navigation.

public setRedirectUrl(string $url) : void
Parameters
$url : string

Redirect URL

setUsername()

Set the username for form repopulation.

public setUsername(string $username) : void
Parameters
$username : string

Username


        
On this page

Search results