MP3_IDv2
[ class tree: MP3_IDv2 ] [ index: MP3_IDv2 ] [ all elements ]

Class: MP3_IDv2_Frame

Source Location: /MP3_IDv2-0.1.8/MP3/IDv2/Frame.php

Class Overview


Data stucture for Idv2 frames in a tag


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2006-2007 Alexander Merz

Variables

Methods


Child classes:

MP3_IDv2_Frame_PCNT
Data stucture for PCNT frame in a tag.
MP3_IDv2_Frame_RBUF
Data stucture for RBUF frame in a tag.
MP3_IDv2_Frame_CommonLink
Data stucture for link frames in a tag.
MP3_IDv2_Frame_UFID
Data stucture for UFID frame in a tag.
MP3_IDv2_Frame_PRIV
Data stucture for PRIV frame in a tag. (Private)
MP3_IDv2_Frame_MCDI
Data stucture for MCDI frames in a tag.
MP3_IDv2_Frame_APIC
Data stucture for APIC frames in a tag.
MP3_IDv2_Frame_POPM
Data stucture for POPM frame in a tag.
MP3_IDv2_Frame_CommonText
Data stucture for text frames in a tag.
MP3_IDv2_Frame_USER
Data stucture for USER frame in a tag.
MP3_IDv2_Frame_USLT
Data stucture for USLT frame in a tag.

Inherited Variables

Inherited Methods


Class Details

[line 53]
Data stucture for Idv2 frames in a tag

This implementation supports currently 2.3



[ Top ]


Class Variables

$_changed =  false

[line 68]

Indicates that the content of the frame was changed
  • Var: true if content was changed and must created again
  • Access: protected

Type:   bool


[ Top ]

$_content =  null

[line 82]

The raw content of the tag
  • Access: protected

Type:   string


[ Top ]

$_decompressedSize =  null

[line 131]

Size of the frame data after uncompression
  • Access: protected

Type:   int


[ Top ]

$_encryptionMethod =  null

[line 138]

Identifier of the method used for encryption
  • Access: protected

Type:   string


[ Top ]

$_flagCompression =  false

[line 110]

Flag to indicate that the frame content is compressed
  • Access: protected

Type:   bool


[ Top ]

$_flagEncryption =  false

[line 124]

Flag to indicate that the frame encrypted
  • Access: protected

Type:   bool


[ Top ]

$_flagFileAlterPres =  false

[line 96]

Flag to indicate to drop this frame or not while changing the file if unknown
  • Access: protected

Type:   bool


[ Top ]

$_flagGroup =  false

[line 117]

Flag to indicate that the frame has a group identifier
  • Access: protected

Type:   bool


[ Top ]

$_flagReadOnly =  false

[line 103]

Flag to indicate to that tis frame should nor be changed
  • Access: protected

Type:   bool


[ Top ]

$_flagTagAlterPres =  false

[line 89]

Flag to indicate to drop this frame or not while changing the tag if unknown
  • Access: protected

Type:   bool


[ Top ]

$_groupid =  null

[line 145]

The identifier for the group
  • Access: protected

Type:   string


[ Top ]

$_id =  null

[line 61]

The identifier of the frame (name of the frame)
  • Access: protected

Type:   string


[ Top ]

$_purpose =  null

[line 75]

The purpose of this frame
  • Access: protected

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 193]

MP3_IDv2_Frame __construct( [String $id = null], [unknown_type $purpose = ''])

Constructor

An instance of the frame class should be never created directly. Use getInstance instead, to receive a frame type specific instance.

A generic frame object may be used for placeholder purposes only. Never apply a generic frame to a file, the result is declared as unpredictable and a subject to change.


Overridden in child classes as:

MP3_IDv2_Frame_PCNT::__construct()
Sets the id and the purpose of the frame
MP3_IDv2_Frame_RBUF::__construct()
Sets the id and the purpose of the frame
MP3_IDv2_Frame_WCOP::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_WCOM::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_WOAS::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_WOAF::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_WPUB::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_WPAY::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_WORS::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_WOAR::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_WXXX::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_UFID::__construct()
Sets the id and the purpose of the frame
MP3_IDv2_Frame_PRIV::__construct()
Sets the id and the purpose of the frame
MP3_IDv2_Frame_MCDI::__construct()
Sets the id and the purpose of the frame
MP3_IDv2_Frame_APIC::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_POPM::__construct()
Sets the id and the purpose of the frame
MP3_IDv2_Frame_TPE3::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TCON::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TOAL::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TRSO::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TIT3::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TIT2::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TENC::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TOWN::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TPE4::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TPE1::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TOPE::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TYER::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TORY::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TXXX::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TPUB::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TSIZ::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TPOS::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_IPLS::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TRCK::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TDAT::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TSSE::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TBPM::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TPE2::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TKEY::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TALB::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TLAN::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TSRC::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TOFN::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TDLY::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TLEN::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TIME::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TFLT::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TRSN::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TIT1::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TRDA::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TEXT::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TOLY::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TMED::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TCOP::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_TCOM::__construct()
Sets the id and purpose of the frame only
MP3_IDv2_Frame_USER::__construct()
sets the id and the purpose of the frame
MP3_IDv2_Frame_USLT::__construct()
Sets the id and the purpose of the frame

Parameters:

String   $id   —  the frame identifier
unknown_type   $purpose   —  the purpose of the frame

[ Top ]

createContent   [line 523]

string createContent( )

Creates the content from the frame data parts.

This method must be overwritten by the FrameID-specific implementations.

  • Return: the created content
  • Access: public

Overridden in child classes as:

MP3_IDv2_Frame_PCNT::createContent()
Creates the content of the frame (encoding+language+tou)
MP3_IDv2_Frame_RBUF::createContent()
Creates the content of the frame (encoding+language+tou)
MP3_IDv2_Frame_CommonLink::createContent()
Creates the content of the frame
MP3_IDv2_Frame_WXXX::createContent()
Creates the content of the frame
MP3_IDv2_Frame_UFID::createContent()
Creates the content of the frame (owner-id + file-id)
MP3_IDv2_Frame_PRIV::createContent()
Creates the content of the frame (encoding+language+tou)
MP3_IDv2_Frame_MCDI::createContent()
Creates the content of the frame (encoding+text)
MP3_IDv2_Frame_APIC::createContent()
Creates the content of the frame (encoding+text)
MP3_IDv2_Frame_POPM::createContent()
Creates the content of the frame (encoding+language+tou)
MP3_IDv2_Frame_CommonText::createContent()
Creates the content of the frame (encoding+text)
MP3_IDv2_Frame_TXXX::createContent()
Creates the whole content (descr+value).
MP3_IDv2_Frame_USER::createContent()
Creates the content of the frame (encoding+language+tou)
MP3_IDv2_Frame_USLT::createContent()
Creates the content of the frame (encoding+language+description+lyrics)

[ Top ]

createFrame   [line 533]

string createFrame( )

Creates the whole frame (header + headerdata + content).
  • Access: public

[ Top ]

createHeader   [line 448]

string createHeader( )

Creates the header of the frame including the header extension according to the frame settings.
  • Return: the created header
  • Access: public

[ Top ]

getEncryptionMethod   [line 334]

string getEncryptionMethod( )

Get the encryption method for the frame data.

[ Top ]

getGroupIdentifier   [line 310]

bool getGroupIdentifier( )

Get the group identifier of the frame

[ Top ]

getId   [line 357]

string getId( )

Returns the identifier of the frame.
  • Return: the frame identifier, a four byte text
  • Access: public

[ Top ]

getInstance   [line 156]

Object getInstance( [String $frameId = ''])

Singleton method the create a specific frame object.

If a specific frame class does not exists, a Frame object is returned.

  • Return: the specific frame object
  • Access: public

Parameters:

String   $frameId   —  the frame type

[ Top ]

getPurpose   [line 204]

string getPurpose( )

Returns the purpose of the frame
  • Return: the frame purpose
  • Access: public

[ Top ]

getRawContent   [line 507]

string getRawContent( )

Returns the unprocessed content of the frame (excluding header)
  • Return: the content 'as is'description
  • Access: public

[ Top ]

hasGroupingIdentifier   [line 262]

bool hasGroupingIdentifier( )

Checks if the frame belongs to a group or should be
  • Return: true if should belongs to a group
  • Access: public

[ Top ]

isCompressed   [line 285]

bool isCompressed( )

Checks if the frame data is compressed or should be
  • Return: true if compression is/should be used
  • Access: public

[ Top ]

isEncrypted   [line 239]

bool isEncrypted( )

Checks if the frame data is encrypted or should be
  • Return: true if encryption is/should be used
  • Access: public

[ Top ]

isFlagFileAlterPres   [line 427]

bool isFlagFileAlterPres( )

Checks if the header flag "File alter preservation" is set.
  • Return: true if flag is set
  • Access: public

[ Top ]

isFlagReadOnly   [line 437]

bool isFlagReadOnly( )

Checks if the frame is marked as read only
  • Return: true if flag is set
  • Access: public

[ Top ]

isFlagTagAlterPres   [line 417]

bool isFlagTagAlterPres( )

Checks if the header flag "Tag alter preservation" is set.
  • Return: true if flag is set
  • Access: public

[ Top ]

setEncryptionMethod   [line 323]

void setEncryptionMethod( string $m)

Sets the encryption method

Parameters:

string   $m   —  one character for the method identifier

[ Top ]

setFlagFileAlterPres   [line 394]

void setFlagFileAlterPres( [bool $f = true])

Sets the header flag "File alter preservation"
  • Access: public

Parameters:

bool   $f   —  true to set the tag

[ Top ]

setFlagReadOnly   [line 406]

void setFlagReadOnly( bool $f)

Sets the header flag "Read only".
  • Access: public

Parameters:

bool   $f   —  true to set the tag

[ Top ]

setFlagTagAlterPres   [line 382]

void setFlagTagAlterPres( [bool $f = true])

Sets the header flag "Tag alter preservation"
  • Access: public

Parameters:

bool   $f   —  true to set the tag

[ Top ]

setGroupIdentifier   [line 298]

void setGroupIdentifier( string $gid)

Sets the grouping identifier for the frame.

Parameters:

string   $gid   —  one character as group identifier

[ Top ]

setId   [line 347]

void setId( string $id)

Sets the identifier of the frame.
  • Access: protected

Parameters:

string   $id   —  a four byte string for the name of the frame

[ Top ]

setPurpose   [line 216]

void setPurpose( string $purpose)

Sets the purpose text of the frame
  • Access: protected

Parameters:

string   $purpose   —  the frame purpose

[ Top ]

setRawContent   [line 369]

void setRawContent( string $content)

Sets the unproccess content of the frame (excluding header!)
  • Access: public

Overridden in child classes as:

MP3_IDv2_Frame_PCNT::setRawContent()
Sets the data of the frame and processes it.
MP3_IDv2_Frame_RBUF::setRawContent()
Sets the data of the frame and processes it.
MP3_IDv2_Frame_CommonLink::setRawContent()
Sets the data of the frame and processes it.
MP3_IDv2_Frame_WXXX::setRawContent()
Sets the data of the frame and processes it.
MP3_IDv2_Frame_UFID::setRawContent()
Sets the data of the frame and processes it.
MP3_IDv2_Frame_PRIV::setRawContent()
Sets the data of the frame and processes it.
MP3_IDv2_Frame_MCDI::setRawContent()
Sets the data of the frame and processes it.
MP3_IDv2_Frame_APIC::setRawContent()
Sets the data of the frame and processes it.
MP3_IDv2_Frame_POPM::setRawContent()
Sets the data of the frame and processes it.
MP3_IDv2_Frame_CommonText::setRawContent()
Sets the data of the frame and processes it.
MP3_IDv2_Frame_TCON::setRawContent()
Sets the data of the frame and processes it.
MP3_IDv2_Frame_TXXX::setRawContent()
Sets the unproccess content of the frame (excluding header!)
MP3_IDv2_Frame_USER::setRawContent()
Sets the data of the frame and processes it.
MP3_IDv2_Frame_USLT::setRawContent()
Sets the data of the frame and processes it.

Parameters:

string   $content   —  the raw frame data without the header

[ Top ]

toString   [line 545]

string toString( )

Returns the frame content as something printable
  • Return: the frame content
  • Access: public

Overridden in child classes as:

MP3_IDv2_Frame_PCNT::toString()
Returns the frame content as something printable
MP3_IDv2_Frame_RBUF::toString()
Returns the frame content as something printable
MP3_IDv2_Frame_CommonLink::toString()
Returns the frame content as something printable
MP3_IDv2_Frame_UFID::toString()
Returns the frame content as something printable
MP3_IDv2_Frame_PRIV::toString()
Returns the frame content as something printable
MP3_IDv2_Frame_MCDI::toString()
Returns the frame content as something printable
MP3_IDv2_Frame_APIC::toString()
Returns the frame content as something printable
MP3_IDv2_Frame_POPM::toString()
Returns the frame content as something printable
MP3_IDv2_Frame_CommonText::toString()
Returns the frame content as something printable
MP3_IDv2_Frame_TCON::toString()
Returns the frame content as something printable
MP3_IDv2_Frame_TXXX::toString()
Returns the frame content as something printable
MP3_IDv2_Frame_IPLS::toString()
Returns the frame content as something printable
MP3_IDv2_Frame_TCOP::toString()
Returns the frame content as something printable
MP3_IDv2_Frame_USER::toString()
Returns the frame content as something printable
MP3_IDv2_Frame_USLT::toString()
Returns the frame content as something printable

[ Top ]

useCompression   [line 274]

void useCompression( [bool $b = true])

Enables/disables the compression of the frame data
  • Access: public

Parameters:

bool   $b   —  true if compression should be used

[ Top ]

useEncryption   [line 229]

void useEncryption( [bool $b = true])

Enables/disables the use of encryption for the frame data
  • Access: public

Parameters:

bool   $b   —  true for enabling, false to disable

[ Top ]

useGroupingIdentifier   [line 252]

void useGroupingIdentifier( [bool $b = true])

Enables/disables the use of a group identifier
  • Access: public

Parameters:

bool   $b   —  true to use a group identifier

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:49:42 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.