PHP Класс FOS\UserBundle\Model\User

Автор: Thibault Duplessis ([email protected])
Автор: Johannes M. Schmitt ([email protected])
Наследование: implements FOS\UserBundle\Model\UserInterface, implements FOS\UserBundle\Model\GroupableInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$algorithm string The algorithm to use for hashing
$confirmationToken string Random string sent to the user email address in order to verify it
$createdAt DateTime
$credentialsExpireAt DateTime
$credentialsExpired boolean
$email string
$emailCanonical string
$enabled boolean
$expired boolean
$expiresAt DateTime
$groups Doctrine\Common\Collections\Collection
$id
$lastLogin DateTime
$locked boolean
$password string Encrypted password. Must be persisted.
$passwordRequestedAt DateTime
$plainPassword string Plain password. Used for model validation. Must not be persisted.
$roles array
$salt string The salt to use for hashing
$updatedAt DateTime
$username string
$usernameCanonical string

Открытые методы

Метод Описание
__construct ( )
__toString ( )
addGroup ( FOS\UserBundle\Model\GroupInterface $group ) : null Add a group to the user groups
addRole ( $role )
equals ( Symfony\Component\Security\Core\User\AccountInterface $account ) : boolean Implementation of AccountInterface.
eraseCredentials ( ) Removes sensitive data from the user.
generateConfirmationToken ( ) : null Generate confirmationToken if it is not set
getAlgorithm ( )
getConfirmationToken ( ) : string Get confirmationToken
getCreatedAt ( ) : DateTime
getEmail ( ) : string Get email
getEmailCanonical ( ) : string Get the canonical email in search and sort queries
getGroupNames ( ) : array Gets the name of the groups which includes the user
getGroups ( ) : Doctrine\Common\Collections\Collection Get groups granted to the user
getId ( ) : mixed Return the user unique id
getLastLogin ( ) : DateTime
getPassword ( ) : string Implements AccountInterface Get the encrypted password
getPasswordRequestedAt ( ) : DateTime Get the timestamp that the user requested a password reset.
getPlainPassword ( )
getRoles ( ) : array Return the user roles Implements AccountInterface
getSalt ( ) : string Implementation of AccountInterface
getUpdatedAt ( ) : DateTime
getUsername ( ) : string
getUsernameCanonical ( ) : string Get the canonical username in search and sort queries
hasGroup ( string $name ) : boolean Indicates whether the user belongs to the specified group or not
hasRole ( string $role ) : void Never use this to check if this user has access to anything!
incrementCreatedAt ( )
incrementUpdatedAt ( )
isAccountNonExpired ( ) : boolean Checks whether the user's account has expired.
isAccountNonLocked ( ) : boolean Checks whether the user is locked.
isCredentialsExpired ( )
isCredentialsNonExpired ( ) : boolean Checks whether the user's credentials (password) has expired.
isEnabled ( ) : boolean Checks whether the user is enabled.
isExpired ( )
isLocked ( )
isPasswordRequestNonExpired ( integer $ttl ) : boolean Checks whether the password reset request has expired.
isSuperAdmin ( ) : boolean Tell if the the given user has the super admin role
isUser ( FOS\UserBundle\Model\UserInterface $user = null ) : boolean Tell if the the given user is this user Useful when not hydrating all fields.
removeGroup ( FOS\UserBundle\Model\GroupInterface $group ) : null Remove a group from the user groups
removeRole ( $role )
setAlgorithm ( $algorithm )
setConfirmationToken ( $confirmationToken ) : null Set confirmationToken
setCredentialsExpireAt ( DateTime $date )
setCredentialsExpired ( $boolean )
setEmail ( string $email ) Set email.
setEmailCanonical ( string $emailCanonical ) Set emailCanonical.
setEnabled ( boolean $boolean )
setExpired ( boolean $boolean ) : void Sets this user to expired
setExpiresAt ( DateTime $date )
setLastLogin ( DateTime $time )
setLocked ( $boolean )
setPassword ( string $password ) : void Sets the hashed password.
setPasswordRequestedAt ( DateTime $date ) Set the timestamp that the user requested a password reset.
setPlainPassword ( $password )
setRoles ( array $roles )
setSuperAdmin ( boolean $boolean ) : void Sets the super admin status
setUsername ( string $username ) Set username.
setUsernameCanonical ( string $usernameCanonical ) Set usernameCanonical.

Описание методов

__construct() публичный Метод

public __construct ( )

__toString() публичный Метод

public __toString ( )

addGroup() публичный Метод

Add a group to the user groups
public addGroup ( FOS\UserBundle\Model\GroupInterface $group ) : null
$group FOS\UserBundle\Model\GroupInterface
Результат null

addRole() публичный Метод

public addRole ( $role )

equals() публичный Метод

Implementation of AccountInterface.
public equals ( Symfony\Component\Security\Core\User\AccountInterface $account ) : boolean
$account Symfony\Component\Security\Core\User\AccountInterface
Результат boolean

eraseCredentials() публичный Метод

Implements AccountInterface
public eraseCredentials ( )

generateConfirmationToken() публичный Метод

Generate confirmationToken if it is not set
public generateConfirmationToken ( ) : null
Результат null

getAlgorithm() публичный Метод

public getAlgorithm ( )

getConfirmationToken() публичный Метод

Get confirmationToken
public getConfirmationToken ( ) : string
Результат string

getCreatedAt() публичный Метод

public getCreatedAt ( ) : DateTime
Результат DateTime

getEmail() публичный Метод

Get email
public getEmail ( ) : string
Результат string

getEmailCanonical() публичный Метод

Get the canonical email in search and sort queries
public getEmailCanonical ( ) : string
Результат string

getGroupNames() публичный Метод

Gets the name of the groups which includes the user
public getGroupNames ( ) : array
Результат array

getGroups() публичный Метод

Get groups granted to the user
public getGroups ( ) : Doctrine\Common\Collections\Collection
Результат Doctrine\Common\Collections\Collection

getId() публичный Метод

Return the user unique id
public getId ( ) : mixed
Результат mixed

getLastLogin() публичный Метод

public getLastLogin ( ) : DateTime
Результат DateTime

getPassword() публичный Метод

Implements AccountInterface Get the encrypted password
public getPassword ( ) : string
Результат string

getPasswordRequestedAt() публичный Метод

Get the timestamp that the user requested a password reset.
public getPasswordRequestedAt ( ) : DateTime
Результат DateTime

getPlainPassword() публичный Метод

public getPlainPassword ( )

getRoles() публичный Метод

Return the user roles Implements AccountInterface
public getRoles ( ) : array
Результат array The roles

getSalt() публичный Метод

Implementation of AccountInterface
public getSalt ( ) : string
Результат string

getUpdatedAt() публичный Метод

public getUpdatedAt ( ) : DateTime
Результат DateTime

getUsername() публичный Метод

public getUsername ( ) : string
Результат string

getUsernameCanonical() публичный Метод

Get the canonical username in search and sort queries
public getUsernameCanonical ( ) : string
Результат string

hasGroup() публичный Метод

Indicates whether the user belongs to the specified group or not
public hasGroup ( string $name ) : boolean
$name string Name of the group
Результат boolean

hasRole() публичный Метод

Use the SecurityContext, or an implementation of AccessDecisionManager instead, e.g. $securityContext->vote('ROLE_USER');
public hasRole ( string $role ) : void
$role string
Результат void

incrementCreatedAt() публичный Метод

public incrementCreatedAt ( )

incrementUpdatedAt() публичный Метод

public incrementUpdatedAt ( )

isAccountNonExpired() публичный Метод

Implements AdvancedAccountInterface
public isAccountNonExpired ( ) : boolean
Результат boolean true if the user's account is non expired, false otherwise

isAccountNonLocked() публичный Метод

Implements AdvancedAccountInterface
public isAccountNonLocked ( ) : boolean
Результат boolean true if the user is not locked, false otherwise

isCredentialsExpired() публичный Метод

isCredentialsNonExpired() публичный Метод

Implements AdvancedAccountInterface
public isCredentialsNonExpired ( ) : boolean
Результат boolean true if the user's credentials are non expired, false otherwise

isEnabled() публичный Метод

Implements AdvancedAccountInterface
public isEnabled ( ) : boolean
Результат boolean true if the user is enabled, false otherwise

isExpired() публичный Метод

public isExpired ( )

isLocked() публичный Метод

public isLocked ( )

isPasswordRequestNonExpired() публичный Метод

Checks whether the password reset request has expired.
public isPasswordRequestNonExpired ( integer $ttl ) : boolean
$ttl integer Requests older than this many seconds will be considered expired
Результат boolean true if the users's password request is non expired, false otherwise

isSuperAdmin() публичный Метод

Tell if the the given user has the super admin role
public isSuperAdmin ( ) : boolean
Результат boolean

isUser() публичный Метод

Tell if the the given user is this user Useful when not hydrating all fields.
public isUser ( FOS\UserBundle\Model\UserInterface $user = null ) : boolean
$user FOS\UserBundle\Model\UserInterface
Результат boolean

removeGroup() публичный Метод

Remove a group from the user groups
public removeGroup ( FOS\UserBundle\Model\GroupInterface $group ) : null
$group FOS\UserBundle\Model\GroupInterface
Результат null

removeRole() публичный Метод

public removeRole ( $role )

setAlgorithm() публичный Метод

public setAlgorithm ( $algorithm )

setConfirmationToken() публичный Метод

Set confirmationToken
public setConfirmationToken ( $confirmationToken ) : null
Результат null

setCredentialsExpireAt() публичный Метод

public setCredentialsExpireAt ( DateTime $date )
$date DateTime

setCredentialsExpired() публичный Метод

public setCredentialsExpired ( $boolean )

setEmail() публичный Метод

Set email.
public setEmail ( string $email )
$email string

setEmailCanonical() публичный Метод

Set emailCanonical.
public setEmailCanonical ( string $emailCanonical )
$emailCanonical string

setEnabled() публичный Метод

public setEnabled ( boolean $boolean )
$boolean boolean

setExpired() публичный Метод

Sets this user to expired
public setExpired ( boolean $boolean ) : void
$boolean boolean
Результат void

setExpiresAt() публичный Метод

public setExpiresAt ( DateTime $date )
$date DateTime

setLastLogin() публичный Метод

public setLastLogin ( DateTime $time )
$time DateTime

setLocked() публичный Метод

public setLocked ( $boolean )

setPassword() публичный Метод

Sets the hashed password.
public setPassword ( string $password ) : void
$password string
Результат void

setPasswordRequestedAt() публичный Метод

Set the timestamp that the user requested a password reset.
public setPasswordRequestedAt ( DateTime $date )
$date DateTime

setPlainPassword() публичный Метод

public setPlainPassword ( $password )

setRoles() публичный Метод

public setRoles ( array $roles )
$roles array

setSuperAdmin() публичный Метод

Sets the super admin status
public setSuperAdmin ( boolean $boolean ) : void
$boolean boolean
Результат void

setUsername() публичный Метод

Set username.
public setUsername ( string $username )
$username string

setUsernameCanonical() публичный Метод

Set usernameCanonical.
public setUsernameCanonical ( string $usernameCanonical )
$usernameCanonical string

Описание свойств

$algorithm защищенное свойство

The algorithm to use for hashing
protected string $algorithm
Результат string

$confirmationToken защищенное свойство

Random string sent to the user email address in order to verify it
protected string $confirmationToken
Результат string

$createdAt защищенное свойство

protected DateTime $createdAt
Результат DateTime

$credentialsExpireAt защищенное свойство

protected DateTime $credentialsExpireAt
Результат DateTime

$credentialsExpired защищенное свойство

protected bool $credentialsExpired
Результат boolean

$email защищенное свойство

protected string $email
Результат string

$emailCanonical защищенное свойство

protected string $emailCanonical
Результат string

$enabled защищенное свойство

protected bool $enabled
Результат boolean

$expired защищенное свойство

protected bool $expired
Результат boolean

$expiresAt защищенное свойство

protected DateTime $expiresAt
Результат DateTime

$groups защищенное свойство

protected Collection,Doctrine\Common\Collections $groups
Результат Doctrine\Common\Collections\Collection

$id защищенное свойство

protected $id

$lastLogin защищенное свойство

protected DateTime $lastLogin
Результат DateTime

$locked защищенное свойство

protected bool $locked
Результат boolean

$password защищенное свойство

Encrypted password. Must be persisted.
protected string $password
Результат string

$passwordRequestedAt защищенное свойство

protected DateTime $passwordRequestedAt
Результат DateTime

$plainPassword защищенное свойство

Plain password. Used for model validation. Must not be persisted.
protected string $plainPassword
Результат string

$roles защищенное свойство

protected array $roles
Результат array

$salt защищенное свойство

The salt to use for hashing
protected string $salt
Результат string

$updatedAt защищенное свойство

protected DateTime $updatedAt
Результат DateTime

$username защищенное свойство

protected string $username
Результат string

$usernameCanonical защищенное свойство

protected string $usernameCanonical
Результат string