Seek frame indicates where other tags in a file/stream can be * found. The minimum offset to next tag is calculated from the end of this tag * to the beginning of the next. There may only be one seek frame in a tag. * * @package php-reader * @subpackage ID3 * @author Sven Vollbehr * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Rev: 75 $ * @since ID3v2.4.0 */ final class ID3_Frame_SEEK extends ID3_Frame { /** @var integer */ private $_minOffset; /** * Constructs the class with given parameters and parses object related data. * * @param Reader $reader The reader object. * @param Array $options The options array. */ public function __construct($reader = null, &$options = array()) { parent::__construct($reader, $options); if ($reader === null) return; $this->_minOffset = Transform::fromInt32BE($this->_data); } /** * Returns the minimum offset to next tag in bytes. * * @return integer */ public function getMinimumOffset() { return $this->_minOffset; } /** * Sets the minimum offset to next tag in bytes. * * @param integer $minOffset The minimum offset. */ public function setMinimumOffset($minOffset) { $this->_minOffset = $minOffset; } /** * Returns the frame raw data. * * @return string */ public function __toString() { $this->setData(Transform::toInt32BE($this->_minOffset)); return parent::__toString(); } }