compared with
Version 3 by Sven Vollbehr
on Jun 03, 2009 10:16.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (1)

View Page History
}
{code}

||Zend_Media_Id3v2||
{code}
final class Zend_Media_Id3v2 extends Zend_Media_Id3_Object
{
/**
* Constructs the Zend_Media_Id3v2 class with given file and options. The
* options array may also be given as the only parameter.
*
* The following options are currently recognized:
* o encoding -- Indicates the encoding that all the texts are presented
* with. See the documentation of iconv for supported values. Please
* note that write operations do not convert string and thus encodings
* are limited to those supported by the {@link Zend_Media_Id3_Encoding}
* interface.
* o version -- The ID3v2 tag version to use in write operation. This
* option is automatically set when a tag is read from a file and
* defaults to version 4.0 for tag write.
* o readonly -- Indicates that the tag is read from a temporary file or
* another source it cannot be written back to. The tag can, however,
* still be written to another file.
*
* @todo Only limited subset of flags are processed.
* @todo Utilize the SEEK frame and search for a footer to find the tag
* @todo Utilize the LINK frame to fetch frames from other sources
* @param string|resource|Zend_Io_Reader $filename The path to the file,
* file descriptor of an opened file, or a {@link Zend_Io_Reader} instance.
* @param Array $options The options array.
* @throws Zend_Media_Id3_Exception if given file descriptor is not valid
*/
public function __construct($filename = null, $options = array());

/**
* Returns the header object.
*
* @return Zend_Media_Id3_Header
*/
public function getHeader();

/**
* Checks whether there is an extended header present in the tag. Returns
* <var>true</var> if the header is present, <var>false</var> otherwise.
*
* @return boolean
*/
public function hasExtendedHeader();

/**
* Returns the extended header object if present, or <var>false</var>
* otherwise.
*
* @return Zend_Media_Id3_ExtendedHeader|false
*/
public function getExtendedHeader();

/**
* Sets the extended header object.
*
* @param Zend_Media_Id3_ExtendedHeader $extendedHeader The header object
*/
public function setExtendedHeader($extendedHeader);

/**
* Checks whether there is a frame given as an argument defined in the tag.
* Returns <var>true</var> if one ore more frames are present,
* <var>false</var> otherwise.
*
* @param string $identifier The frame name.
* @return boolean
*/
public function hasFrame($identifier);

/**
* 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.
*
* @return Array
*/
public function getFrames();

/**
* 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 method.
*
* @param string $identifier The frame name.
* @return Array
*/
public function getFramesByIdentifier($identifier);

/**
* Removes any frames matching the given object identifier.
*
* The identifier may contain wildcard characters '*' and '?'. The asterisk
* matches against zero or more characters, and the question mark matches
* any single character.
*
* One may also use the shorthand unset($obj->identifier) to achieve the
* same result. Wildcards cannot be used with the shorthand method.
*
* @param string $identifier The frame name.
*/
public final function removeFramesByIdentifier($identifier);

/**
* Adds a new frame to the tag and returns it.
*
* @param Zend_Media_Id3_Frame $frame The frame to add.
* @return Zend_Media_Id3_Frame
*/
public function addFrame($frame);

/**
* Remove the given frame from the tag.
*
* @param Zend_Media_Id3_Frame $frame The frame to remove.
*/
public function removeFrame($frame);

/**
* Checks whether there is a footer present in the tag. Returns
* <var>true</var> if the footer is present, <var>false</var> otherwise.
*
* @return boolean
*/
public function hasFooter();

/**
* Returns the footer object if present, or <var>false</var> otherwise.
*
* @return Zend_Media_Id3_Header|false
*/
public function getFooter();

/**
* Sets whether the tag should have a footer defined.
*
* @param boolean $useFooter Whether the tag should have a footer
*/
public function setFooter($useFooter);

/**
* 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.
*
* @param string $filename The optional path to the file.
*/
public function write($filename);

/**
* 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.
*
* @param string $name The frame or field name.
* @return mixed
*/
public function __get($name);

/**
* Magic function so that isset($obj->value) will work. This method checks
* whether the frame matching the identifier exists.
*
* @param string $name The frame identifier.
* @return boolean
*/
public function __isset($name);

/**
* Magic function so that unset($obj->value) will work. This method removes
* all the frames matching the identifier.
*
* @param string $name The frame identifier.
*/
public function __unset($name);
}
{code}

{zone-data}