PHP Класс Webiny\Component\OAuth2\OAuth2User

This class is returned when you request user details form an OAuth2 server. This class standardizes the data that you get back because every OAuth2 server has its own user structure.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$avatarUrl string
$email string
$firstName string
$gender integer
$lastName string
$lastUpdated integer
$profileId string
$profileUrl string
$serviceName integer
$username string

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

Метод Описание
__construct ( string $username, string $email ) Base constructor.
getAvatarUrl ( ) : string Get the url to users avatar on the OAuth2 server.
getFirstName ( ) : string Get users first name.
getGender ( ) : string Get users gender.
getLastName ( ) : string Get users last name.
getLastUpdateTime ( ) : integer Get the date when user last updated his profile on the OAuth2 server.
getProfileId ( ) : string Get user profile id on the current OAuth2 server.
getProfileUrl ( ) : string Returns the url to users profile on the OAuth2 server.
getServiceName ( ) : string Returns the name of the current OAuth2 server (like facebook, linkedin etc.).
setAvatarUrl ( string $avatarUrl ) Set the url to users avatar on the current OAuth2 server.
setFirstName ( string $firstName ) Set users first name.
setGender ( $gender ) Set the gender of the user, can be 'male' or 'female'.
setLastName ( $lastName ) Set users last name.
setLastUpdateTime ( integer $timestamp ) Set the date when user last updated his profile on the OAuth2 server.
setProfileId ( string $id ) Set the id of user of the current OAuth2 server.
setProfileUrl ( string $profileUrl ) Set the url of users profile on the current OAuth2 server.
setServiceName ( string $serviceName ) Set the service name that user used to login (like facebook, linkedin etc.)

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

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

Base constructor.
public __construct ( string $username, string $email )
$username string Users username.
$email string Users email.

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

Get the url to users avatar on the OAuth2 server.
public getAvatarUrl ( ) : string
Результат string

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

Get users first name.
public getFirstName ( ) : string
Результат string

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

Get users gender.
public getGender ( ) : string
Результат string

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

Get users last name.
public getLastName ( ) : string
Результат string

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

Get the date when user last updated his profile on the OAuth2 server.
public getLastUpdateTime ( ) : integer
Результат integer Timestamp in milliseconds.

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

Get user profile id on the current OAuth2 server.
public getProfileId ( ) : string
Результат string

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

Returns the url to users profile on the OAuth2 server.
public getProfileUrl ( ) : string
Результат string

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

Returns the name of the current OAuth2 server (like facebook, linkedin etc.).
public getServiceName ( ) : string
Результат string

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

Set the url to users avatar on the current OAuth2 server.
public setAvatarUrl ( string $avatarUrl )
$avatarUrl string

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

Set users first name.
public setFirstName ( string $firstName )
$firstName string

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

Set the gender of the user, can be 'male' or 'female'.
public setGender ( $gender )
$gender

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

Set users last name.
public setLastName ( $lastName )
$lastName

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

Set the date when user last updated his profile on the OAuth2 server.
public setLastUpdateTime ( integer $timestamp )
$timestamp integer Timestamp in milliseconds.

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

Set the id of user of the current OAuth2 server.
public setProfileId ( string $id )
$id string

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

Set the url of users profile on the current OAuth2 server.
public setProfileUrl ( string $profileUrl )
$profileUrl string

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

Set the service name that user used to login (like facebook, linkedin etc.)
public setServiceName ( string $serviceName )
$serviceName string

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

$avatarUrl публичное свойство

public string $avatarUrl
Результат string

$email публичное свойство

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

$firstName публичное свойство

public string $firstName
Результат string

$gender публичное свойство

public int $gender
Результат integer

$lastName публичное свойство

public string $lastName
Результат string

$lastUpdated публичное свойство

public int $lastUpdated
Результат integer

$profileId публичное свойство

public string $profileId
Результат string

$profileUrl публичное свойство

public string $profileUrl
Результат string

$serviceName публичное свойство

public int $serviceName
Результат integer

$username публичное свойство

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