This class represents a file containing ID3v2 headers as described in ID3v2 structure document.
ID3v2 is a general tagging format for audio, which makes it possible to store meta data about the audio inside the audio file itself. The ID3 tag is mainly targeted at files encoded with MPEG-1/2 layer I, MPEG-1/2 layer II, MPEG-1/2 layer III and MPEG-2.5, but may work with other types of encoded audio or as a stand alone format for audio meta data.
ID3v2 is designed to be as flexible and expandable as possible to meet new meta information needs that might arise. To achieve that ID3v2 is constructed as a container for several information blocks, called frames, whose format need not be known to the software that encounters them. Each frame has an unique and predefined identifier which allows software to skip unknown frames.
Located in /ID3v2.php (line 71)
Constructs the ID3v2 class with given file and options. The options array may also be given as the only parameter.
The following options are currently recognized:
Returns the extended header object if present, or false otherwise.
Returns the footer object if present, or false otherwise.
Returns all the frames the tag contains as an associate array. The frame identifiers work as keys having an array of frames as associated value.
Returns an array of frames matching the given identifier or an empty array if no frames matched the identifier.
The identifier may contain wildcard characters "*" and "?". The asterisk matches against zero or more characters, and the question mark matches any single character.
Please note that one may also use the shorthand $obj->identifier to access the first frame with the identifier given. Wildcards cannot be used with the shorthand.
Checks whether there is an extended header present in the tag. Returns true if the header is present, false otherwise.
Checks whether there is a footer present in the tag. Returns true if the footer is present, false otherwise.
Checks whether there is a frame given as an argument defined in the tag.
Returns true if one ore more frames are present, false otherwise.
Sets the extended header object.
Sets whether the tag should have a footer defined.
Writes the possibly altered ID3v2 tag back to the file where it was read.
If the class was constructed without a file name, one can be provided here as an argument. Regardless, the write operation will override previous tag information, if found.
If write is called without setting any frames to the tag, the tag is removed from the file.
Magic function so that $obj->value will work. The method will attempt to return the first frame that matches the identifier.
If there is no frame or field with given name, the method will attempt to create a frame with given identifier.
If none of these work, an exception is thrown.
Magic function so that isset($obj->value) will work. This method checks whether the frame matching the identifier exists.
Returns the tag raw data.
Magic function so that unset($obj->value) will work. This method removes all the frames matching the identifier.
Documentation generated on Fri, 05 Sep 2008 20:18:50 +0300 by phpDocumentor 1.4.1