POPM
extends Frame
in package
POPM frame - Popularimeter.
The 'Popularimeter' frame is meant to specify how good an audio file is. It contains a user email, a rating, and a play counter.
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructs the POPM frame with given parameters.
- getCounter() : int
- Returns the counter.
- getEmail() : string
- Returns the email.
- getEncoding() : int
- Returns the text encoding.
- getRating() : int
- Returns the rating.
- parse() : self
- Parses the frame data.
- setCounter() : self
- Sets the counter.
- setEmail() : self
- Sets the email.
- setEncoding() : self
- Sets the text encoding.
- setRating() : self
- Sets the rating.
- toBytes() : string
- Converts the frame to binary data.
Properties
$counter
protected
int
$counter
= 0
protected
string
$email
= ''
$encoding
protected
int
$encoding
= Encoding::UTF8
$frameId
protected
string
$frameId
Hooks
protected
string
get
$rating
protected
int
$rating
= 0
Methods
__construct()
Constructs the POPM frame with given parameters.
public
__construct([string $email = '' ][, int $rating = 0 ][, int $counter = 0 ]) : mixed
Parameters
- $email : string = ''
- $rating : int = 0
- $counter : int = 0
getCounter()
Returns the counter.
public
getCounter() : int
Return values
intgetEmail()
Returns the email.
public
getEmail() : string
Return values
stringgetEncoding()
Returns the text encoding.
public
getEncoding() : int
Return values
intgetRating()
Returns the rating.
public
getRating() : int
Return values
intparse()
Parses the frame data.
public
parse(string $frameData) : self
Parameters
- $frameData : string
Return values
selfsetCounter()
Sets the counter.
public
setCounter(int $counter) : self
Parameters
- $counter : int
Return values
selfsetEmail()
Sets the email.
public
setEmail(string $email) : self
Parameters
- $email : string
Return values
selfsetEncoding()
Sets the text encoding.
public
setEncoding(int $encoding) : self
Parameters
- $encoding : int
Return values
selfsetRating()
Sets the rating.
public
setRating(int $rating) : self
Parameters
- $rating : int
Return values
selftoBytes()
Converts the frame to binary data.
public
toBytes() : string