TYER
extends TextFrame
in package
TYER frame - Year.
The 'Year' frame is a numeric string with the year of the recording. This frame is always four characters long (until the year 10000).
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructs the TYER frame with given parameters.
- getEncoding() : int
- Returns the text encoding.
- getText() : string
- Returns the text content.
- getYear() : string
- Returns the year.
- parse() : self
- Parses the frame data.
- setEncoding() : self
- Sets the text encoding.
- setText() : self
- Sets the text content.
- setYear() : self
- Sets the year.
- setYearInt() : self
- Sets the year as an integer.
- toBytes() : string
- Converts the frame to binary data.
Properties
$encoding
protected
int
$encoding
= Encoding::UTF8
$frameId
protected
string
$frameId
Hooks
protected
string
get
$text
protected
string
$text
= ''
Methods
__construct()
Constructs the TYER frame with given parameters.
public
__construct([string $year = '' ][, int $encoding = Encoding::UTF8 ]) : mixed
Parameters
- $year : string = ''
-
The year
- $encoding : int = Encoding::UTF8
-
The text encoding
getEncoding()
Returns the text encoding.
public
getEncoding() : int
Return values
intgetText()
Returns the text content.
public
getText() : string
Return values
stringgetYear()
Returns the year.
public
getYear() : string
Return values
stringparse()
Parses the frame data.
public
parse(string $frameData) : self
Parameters
- $frameData : string
Return values
selfsetEncoding()
Sets the text encoding.
public
setEncoding(int $encoding) : self
Parameters
- $encoding : int
Return values
selfsetText()
Sets the text content.
public
setText(string $text) : self
Parameters
- $text : string
Return values
selfsetYear()
Sets the year.
public
setYear(string $year) : self
Parameters
- $year : string
-
The year
Return values
selfsetYearInt()
Sets the year as an integer.
public
setYearInt(int $year) : self
Parameters
- $year : int
-
The year
Return values
selftoBytes()
Converts the frame to binary data.
public
toBytes() : string