PHP Class Webiny\Component\TwitterOAuth\TwitterOAuthUser

This class is returned when you request user details form an TwitterOAuth server. This class standardizes the data that you get back because every TwitterOAuth server has its own user structure.
Show file Open project: Webiny/Framework Class Usage Examples

Public Properties

Property Type Description
$avatarUrl string
$description string
$lastUpdated integer
$location string
$name string
$profileId integer
$profileUrl string
$username string
$website string

Public Methods

Method Description
__construct ( string $username ) Base constructor.
getAvatarUrl ( ) : string Get the url to users avatar on the TwitterOAuth server.
getDescription ( ) : string Get user profile description.
getLastUpdateTime ( ) : integer Get the date when user last updated his profile on the TwitterOAuth server.
getLocation ( ) : string Get user location.
getName ( ) : string Get users first name.
getProfileId ( ) : string Get user profile id on the current server.
getProfileUrl ( ) : string Returns the url to users profile on the TwitterOAuth server.
getUsername ( ) : string Returns current username.
getWebsite ( ) : string Get the user website.
setAvatarUrl ( string $avatarUrl ) Set the url to users avatar on the current TwitterOAuth server.
setDescription ( string $description ) Set user profile description.
setLastUpdateTime ( integer $timestamp ) Set the date when user last updated his profile on the TwitterOAuth server.
setLocation ( $location ) Set the user location value.
setName ( string $name ) Set users first name.
setProfileId ( string $id ) Set the id of user of the current server.
setProfileUrl ( string $profileUrl ) Set the url of users profile on the current TwitterOAuth server.
setWebsite ( string $website ) Set the users website url.

Method Details

__construct() public method

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

getAvatarUrl() public method

Get the url to users avatar on the TwitterOAuth server.
public getAvatarUrl ( ) : string
return string

getDescription() public method

Get user profile description.
public getDescription ( ) : string
return string

getLastUpdateTime() public method

Get the date when user last updated his profile on the TwitterOAuth server.
public getLastUpdateTime ( ) : integer
return integer Timestamp in milliseconds.

getLocation() public method

Get user location.
public getLocation ( ) : string
return string

getName() public method

Get users first name.
public getName ( ) : string
return string

getProfileId() public method

Get user profile id on the current server.
public getProfileId ( ) : string
return string

getProfileUrl() public method

Returns the url to users profile on the TwitterOAuth server.
public getProfileUrl ( ) : string
return string

getUsername() public method

Returns current username.
public getUsername ( ) : string
return string

getWebsite() public method

Get the user website.
public getWebsite ( ) : string
return string

setAvatarUrl() public method

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

setDescription() public method

Set user profile description.
public setDescription ( string $description )
$description string

setLastUpdateTime() public method

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

setLocation() public method

Set the user location value.
public setLocation ( $location )
$location

setName() public method

Set users first name.
public setName ( string $name )
$name string

setProfileId() public method

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

setProfileUrl() public method

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

setWebsite() public method

Set the users website url.
public setWebsite ( string $website )
$website string

Property Details

$avatarUrl public property

public string $avatarUrl
return string

$description public property

public string $description
return string

$lastUpdated public property

public int $lastUpdated
return integer

$location public property

public string $location
return string

$name public property

public string $name
return string

$profileId public property

public int $profileId
return integer

$profileUrl public property

public string $profileUrl
return string

$username public property

public string $username
return string

$website public property

public string $website
return string