PHP Класс app\models\User

Наследование: extends yii\db\ActiveRecord, implements yii\web\IdentityInterface
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$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.

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

Метод Описание
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.

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

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

Determine if the user is connected to Last.fm.
public connectedToLastfm ( ) : boolean
Результат boolean

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

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

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

Get the user's Last.fm session key.
public getLastfmSessionKeyAttribute ( ) : string | null
Результат string | null The key if found, or null if user isn't connected to Last.fm

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

Get a preference item of the current user.
public getPreference ( string $key ) : string | null
$key string
Результат string | null

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

Unserialize the user preferences back to an array before returning.
public getPreferencesAttribute ( string $value ) : array
$value string
Результат array

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

public interactions ( )

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

public playlists ( )

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

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

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

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

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

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

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

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

protected $casts

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

The attributes that are protected from mass assign.
protected array $guarded
Результат array

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

The attributes excluded from the model's JSON form.
protected array $hidden
Результат array

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

The preferences that we don't want to show to the client.
protected array $hiddenPreferences
Результат array

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

The database table used by the model.
protected string $table
Результат string