* @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 $ */ abstract class ID3_Frame_AbstractLink extends ID3_Frame { /** @var string */ protected $_link; /** * 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) $this->_link = implode($this->explodeString8($this->_data, 1), ""); } /** * Returns the link associated with the frame. * * @return string */ public function getLink() { return $this->_link; } /** * Sets the link. The link encoding is always ISO-8859-1. * * @param string $link The link. */ public function setLink($link) { $this->_link = $link; } /** * Returns the frame raw data. * * @return string */ public function __toString() { $this->setData($this->_link); return parent::__toString(); } }