PHP Class app\models\User

Inheritance: extends yii\db\ActiveRecord, implements yii\web\IdentityInterface
Afficher le fichier Open project: phanan/koel Class Usage Examples

Protected Properties

Свойство Type Description
$casts
$guarded array The attributes that are protected from mass assign.
$hidden array The attributes excluded from the model's JSON form.
$hiddenPreferences array The preferences that we don't want to show to the client.
$table string The database table used by the model.

Méthodes publiques

Méthode Description
connectedToLastfm ( ) : boolean Determine if the user is connected to Last.fm.
deletePreference ( string $key ) Delete a preference.
getLastfmSessionKeyAttribute ( ) : string | null Get the user's Last.fm session key.
getPreference ( string $key ) : string | null Get a preference item of the current user.
getPreferencesAttribute ( string $value ) : array Unserialize the user preferences back to an array before returning.
interactions ( )
playlists ( )
savePreference ( string $key, string $val ) Save a user preference.
setPreference ( $key, $val ) An alias to savePreference().
setPreferencesAttribute ( array $value ) User preferences are stored as a serialized associative array.

Method Details

connectedToLastfm() public méthode

Determine if the user is connected to Last.fm.
public connectedToLastfm ( ) : boolean
Résultat boolean

deletePreference() public méthode

Delete a preference.
public deletePreference ( string $key )
$key string

getLastfmSessionKeyAttribute() public méthode

Get the user's Last.fm session key.
public getLastfmSessionKeyAttribute ( ) : string | null
Résultat string | null The key if found, or null if user isn't connected to Last.fm

getPreference() public méthode

Get a preference item of the current user.
public getPreference ( string $key ) : string | null
$key string
Résultat string | null

getPreferencesAttribute() public méthode

Unserialize the user preferences back to an array before returning.
public getPreferencesAttribute ( string $value ) : array
$value string
Résultat array

interactions() public méthode

public interactions ( )

playlists() public méthode

public playlists ( )

savePreference() public méthode

Save a user preference.
public savePreference ( string $key, string $val )
$key string
$val string

setPreference() public méthode

An alias to savePreference().
public setPreference ( $key, $val )
$key
$val

setPreferencesAttribute() public méthode

User preferences are stored as a serialized associative array.
public setPreferencesAttribute ( array $value )
$value array

Property Details

$casts protected_oe property

protected $casts

$guarded protected_oe property

The attributes that are protected from mass assign.
protected array $guarded
Résultat array

$hidden protected_oe property

The attributes excluded from the model's JSON form.
protected array $hidden
Résultat array

$hiddenPreferences protected_oe property

The preferences that we don't want to show to the client.
protected array $hiddenPreferences
Résultat array

$table protected_oe property

The database table used by the model.
protected string $table
Résultat string