Frame
in package
implements
Encoding
AbstractYes
Base class for ID3v2 frames.
This class provides common functionality for all frame types.
Table of Contents
Interfaces
- Encoding
- The Encoding interface defines constants for text encodings used in ID3v2 frames.
Properties
Methods
- __construct() : mixed
- Constructs the Frame class with given parameters.
- getEncoding() : int
- Returns the text encoding.
- parse() : self
- Parses the frame data.
- setEncoding() : self
- Sets the text encoding.
- toBytes() : string
- Converts the frame to binary data.
Properties
$encoding
protected
int
$encoding
= Encoding::UTF8
$frameId
protected
string
$frameId
Hooks
protected
string
get
Methods
__construct()
Constructs the Frame class with given parameters.
public
__construct(string $frameId[, int $encoding = Encoding::UTF8 ]) : mixed
Parameters
- $frameId : string
- $encoding : int = Encoding::UTF8
getEncoding()
Returns the text encoding.
public
getEncoding() : int
Return values
intparse()
Parses the frame data.
public
abstract parse(string $frameData) : self
Parameters
- $frameData : string
Return values
selfsetEncoding()
Sets the text encoding.
public
setEncoding(int $encoding) : self
Parameters
- $encoding : int
Return values
selftoBytes()
Converts the frame to binary data.
public
abstract toBytes() : string