MetadataManager

Manager for optional session metadata.

final
since

3.8.6

internal

Methods

__construct

MetadataManager constructor.

__construct(\Joomla\Application\AbstractApplication $app, \Joomla\Database\DatabaseInterface $db) 
since

3.8.6

Arguments

$app

\Joomla\Application\AbstractApplicationApplication object.

$db

\Joomla\Database\DatabaseInterfaceDatabase driver.

checkSessionRecordExists

Check if the session record exists

checkSessionRecordExists(string $sessionId) : integer
since

4.0.0

Arguments

$sessionId

stringThe session ID to check

Response

integerStatus value for record presence

createOrUpdateRecord

Create the metadata record if it does not exist.

createOrUpdateRecord(\Joomla\Session\SessionInterface $session, \Joomla\CMS\User\User $user) : void
since

4.0.0

throws

\RuntimeException

Arguments

$session

\Joomla\Session\SessionInterfaceThe session to create or update the metadata record for.

$user

\Joomla\CMS\User\UserThe user to associate with the record.

createRecordIfNonExisting

Create the metadata record if it does not exist.

createRecordIfNonExisting(\Joomla\Session\SessionInterface $session, \Joomla\CMS\User\User $user) : void
since

3.8.6

throws

\RuntimeException

Arguments

$session

\Joomla\Session\SessionInterfaceThe session to create the metadata record for.

$user

\Joomla\CMS\User\UserThe user to associate with the record.

createSessionRecord

Create the session record

createSessionRecord(\Joomla\Session\SessionInterface $session, \Joomla\CMS\User\User $user) : void
since

4.0.0

Arguments

$session

\Joomla\Session\SessionInterfaceThe session to create the metadata record for.

$user

\Joomla\CMS\User\UserThe user to associate with the record.

deletePriorTo

Delete records with a timestamp prior to the given time.

deletePriorTo(integer $time) : void
since

3.8.6

Arguments

$time

integerThe time records should be deleted if expired before.

updateSessionRecord

Update the session record

updateSessionRecord(\Joomla\Session\SessionInterface $session, \Joomla\CMS\User\User $user) : void
since

4.0.0

Arguments

$session

\Joomla\Session\SessionInterfaceThe session to update the metadata record for.

$user

\Joomla\CMS\User\UserThe user to associate with the record.

Properties

sessionRecordExists

Internal variable indicating a session record exists.

static
since

4.0.0

note

Once PHP 7.1 is the minimum supported version this should become a private constant

Type(s)

integer

sessionRecordDoesNotExist

Internal variable indicating a session record does not exist.

static
since

4.0.0

note

Once PHP 7.1 is the minimum supported version this should become a private constant

Type(s)

integer

sessionRecordUnknown

Internal variable indicating an unknown session record statue.

static
since

4.0.0

note

Once PHP 7.1 is the minimum supported version this should become a private constant

Type(s)

integer

app

Application object.

since

3.8.6

Type(s)

\Joomla\Application\AbstractApplication

db

Database driver.

since

3.8.6

Type(s)

\Joomla\Database\DatabaseInterface