Group identification registration, to be signed. Although signatures * can reside inside the registration frame, it might be desired to store the * signature elsewhere, e.g. in watermarks. There may be more than one signature * frame in a tag, but no two may be identical. * * @package php-reader * @subpackage ID3 * @author Sven Vollbehr * @author Ryan Butterfield * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Rev: 105 $ * @since ID3v2.4.0 */ final class ID3_Frame_SIGN extends ID3_Frame { /** @var integer */ private $_group; /** @var string */ private $_signature; /** * 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->_group = Transform::fromUInt8(substr($this->_data, 0, 1)); $this->_signature = substr($this->_data, 1); } /** * Returns the group symbol byte. * * @return integer */ public function getGroup() { return $this->_group; } /** * Sets the group symbol byte. * * @param integer $group The group symbol byte. */ public function setGroup($group) { $this->_group = $group; } /** * Returns the signature binary data. * * @return string */ public function getSignature() { return $this->_signature; } /** * Sets the signature binary data. * * @param string $signature The signature binary data string. */ public function setSignature($signature) { $this->_signature = $signature; } /** * Returns the frame raw data. * * @return string */ public function __toString() { $this->setData(Transform::toUInt8($this->_group) . $this->_signature); return parent::__toString(); } }