Class ID3_Object

Description

The base class for all ID3v2 objects.

Located in /ID3/Object.php (line 49)


	
			
Direct descendents
Class Description
ID3_ExtendedHeader The extended header contains information that can provide further insight in the structure of the tag, but is not vital to the correct parsing of the tag information; hence the extended header is optional.
ID3_Frame A base class for all ID3v2 frames as described in the ID3v2 frames document.
ID3_Header The first part of the ID3v2 tag is the 10 byte tag header. The header contains information about the tag version and options.
Variable Summary
Method Summary
ID3_Object __construct ([Reader $reader = null], [ &$options = array()], Array $options)
integer decodeSynchsafe32 (integer $val)
string decodeUnsynchronisation ( &$data, string $data)
integer encodeSynchsafe32 (integer $val)
string encodeUnsynchronisation ( &$data, string $data)
Array explodeString8 (string $value, [ $limit = null])
Array explodeString16 (string $value, [ $limit = null])
void getOption (string $option, [mixed $defaultValue = false])
Array getOptions ()
void setOption (string $option, mixed $value)
void setOptions ( &$options, Array $options)
mixed __get (string $name)
mixed __set (string $name, string $value)
Variables
Reader $_reader (line 56)

The reader object.

  • access: protected
Methods
Constructor __construct (line 72)

Constructs the class with given parameters and reads object related data from the ID3v2 tag.

  • access: public
ID3_Object __construct ([Reader $reader = null], [ &$options = array()], Array $options)
  • Reader $reader: The reader object.
  • Array $options: The options array.
  • &$options

Redefined in descendants as:
decodeSynchsafe32 (line 165)

Decodes the given 28-bit synchsafe integer to regular 32-bit integer.

  • access: protected
integer decodeSynchsafe32 (integer $val)
  • integer $val: The integer to decode
decodeUnsynchronisation (line 203)

Reverses the unsynchronisation scheme from the given data string.

  • see: encodeUnsyncronisation
  • access: protected
string decodeUnsynchronisation ( &$data, string $data)
  • string $data: The input data.
  • &$data
encodeSynchsafe32 (line 153)

Encodes the given 32-bit integer to 28-bit synchsafe integer, where the most significant bit of each byte is zero, making seven bits out of eight available.

  • access: protected
integer encodeSynchsafe32 (integer $val)
  • integer $val: The integer to encode.
encodeUnsynchronisation (line 184)

Applies the unsynchronisation scheme to the given data string.

Whenever a false synchronisation is found within the data, one zeroed byte is inserted after the first false synchronisation byte. This has the side effect that all 0xff00 combinations have to be altered, so they will not be affected by the decoding process. Therefore all the 0xff00 combinations have to be replaced with the 0xff0000 combination during the unsynchronisation.

  • access: protected
string encodeUnsynchronisation ( &$data, string $data)
  • string $data: The input data.
  • &$data
explodeString8 (line 248)

Splits UTF-8 or ISO-8859-1 formatted binary data according to null terminators residing in the string, up to a given limit.

  • access: protected
Array explodeString8 (string $value, [ $limit = null])
  • string $value: The input string.
  • $limit
explodeString16 (line 221)

Splits UTF-16 formatted binary data up according to null terminators residing in the string, up to a given limit.

  • access: protected
Array explodeString16 (string $value, [ $limit = null])
  • string $value: The input string.
  • $limit
getOption (line 92)

Returns the given option value, or the default value if the option is not defined.

  • access: public
void getOption (string $option, [mixed $defaultValue = false])
  • string $option: The name of the option.
  • mixed $defaultValue: The default value to be returned.
getOptions (line 83)

Returns the options array.

  • access: public
Array getOptions ()
setOption (line 112)

Sets the given option the given value.

  • access: public
void setOption (string $option, mixed $value)
  • string $option: The name of the option.
  • mixed $value: The value to set for the option.
setOptions (line 104)

Sets the options array. See ID3v2 class for available options.

  • access: public
void setOptions ( &$options, Array $options)
  • Array $options: The options array.
  • &$options
__get (line 123)

Magic function so that $obj->value will work.

  • access: public
mixed __get (string $name)
  • string $name: The field name.
__set (line 137)

Magic function so that assignments with $obj->value will work.

  • access: public
mixed __set (string $name, string $value)
  • string $name: The field name.
  • string $value: The field value.

Documentation generated on Fri, 05 Sep 2008 20:19:10 +0300 by phpDocumentor 1.4.1