PHP Class app\models\Interaction

Inheritance: extends Jenssegers\Mongodb\Model
Afficher le fichier Open project: phanan/koel Class Usage Examples

Protected Properties

Свойство Type Description
$casts
$guarded
$hidden

Méthodes publiques

Méthode Description
batchLike ( array $songIds, User $user ) : array Like several songs at once.
batchUnlike ( array $songIds, User $user ) : integer Unlike several songs at once.
increasePlayCount ( string $songId, User $user ) : Interaction Increase the number of times a song is played by a user.
song ( )
toggleLike ( string $songId, User $user ) : Interaction Like or unlike a song on behalf of a user.
user ( )

Method Details

batchLike() public static méthode

Like several songs at once.
public static batchLike ( array $songIds, User $user ) : array
$songIds array
$user User
Résultat array

batchUnlike() public static méthode

Unlike several songs at once.
public static batchUnlike ( array $songIds, User $user ) : integer
$songIds array
$user User
Résultat integer

increasePlayCount() public static méthode

Increase the number of times a song is played by a user.
public static increasePlayCount ( string $songId, User $user ) : Interaction
$songId string
$user User
Résultat Interaction

song() public méthode

public song ( )

toggleLike() public static méthode

Like or unlike a song on behalf of a user.
public static toggleLike ( string $songId, User $user ) : Interaction
$songId string
$user User
Résultat Interaction

user() public méthode

public user ( )

Property Details

$casts protected_oe property

protected $casts

$guarded protected_oe property

protected $guarded

$hidden protected_oe property

protected $hidden