Bånder

LastFmCredentialService
in package

Table of Contents

Properties

$credentialService  : ThirdPartyCredentialService

Methods

__construct()  : mixed
disconnect()  : bool
Remove Last.fm credentials for a user
getCredentials()  : ThirdPartyCredential|null
Get valid Last.fm credentials for a user
getSessionKey()  : string|null
Get Last.fm session key for a user
getUserData()  : array<string|int, mixed>
Get Last.fm user data
getUsername()  : string|null
Get Last.fm username for a user
hasCredentials()  : bool
Check if user has valid Last.fm credentials Note: This only checks if credentials exist, not if they're valid with Last.fm API
hasValidCredentials()  : bool
Check if user has valid Last.fm credentials by validating with API This method should be called from LastFmClient to avoid circular dependency
updateUserData()  : bool
Update user's Last.fm profile data

Properties

Methods

getSessionKey()

Get Last.fm session key for a user

public getSessionKey(User $user) : string|null
Parameters
$user : User
Return values
string|null

getUserData()

Get Last.fm user data

public getUserData(User $user) : array<string|int, mixed>
Parameters
$user : User
Return values
array<string|int, mixed>

getUsername()

Get Last.fm username for a user

public getUsername(User $user) : string|null
Parameters
$user : User
Return values
string|null

hasCredentials()

Check if user has valid Last.fm credentials Note: This only checks if credentials exist, not if they're valid with Last.fm API

public hasCredentials(User $user) : bool
Parameters
$user : User
Return values
bool

hasValidCredentials()

Check if user has valid Last.fm credentials by validating with API This method should be called from LastFmClient to avoid circular dependency

public hasValidCredentials(User $user[, callable|null $validator = null ]) : bool
Parameters
$user : User
$validator : callable|null = null
Return values
bool

updateUserData()

Update user's Last.fm profile data

public updateUserData(User $user, array<string|int, mixed> $userData) : bool
Parameters
$user : User
$userData : array<string|int, mixed>
Return values
bool

        
On this page

Search results