IdentityAware

Trait for application classes which are identity (user) aware

since

4.0.0

package

Joomla CMS

Methods

getIdentity

Get the application identity.

getIdentity() : \Joomla\CMS\User\User
since

4.0.0

Response

User|null

getUserFactory

Get the UserFactoryInterface.

getUserFactory() : \Joomla\CMS\User\UserFactoryInterface
inherited
since

4.4.0

throws

UnexpectedValueExceptionMay be thrown if the UserFactory has not been set.

Response

UserFactoryInterface

loadIdentity

Allows the application to load a custom or default identity.

loadIdentity(\Joomla\CMS\User\User identity = null) : 
since

4.0.0

Arguments

identity

User|nullAn optional identity object. If omitted, a null user object is created.

Response

$this

setUserFactory

Set the user factory to use.

setUserFactory(\Joomla\CMS\User\UserFactoryInterface userFactory) : 
inherited
since

4.4.0

Arguments

userFactory

UserFactoryInterfaceThe user factory to use.

Response

void

Properties

userFactory

UserFactoryInterface

inherited
since

4.4.0

Type(s)

UserFactoryInterface

identity

The application identity object.

since

4.0.0

Type(s)

User