/** * Set the version held by this entry. * * @param float the version. The size of the entries leave room for * exactly four digits: two digits on either side of the decimal * point. */ function setValue($version = 0.0) { $this->version = $version; $major = floor($version); $minor = ($version - $major) * 100; parent::setValue(sprintf('%02.0f%02.0f', $major, $minor)); }
/** * Set the user comment. * * @param * string the new user comment. * * @param * string the encoding of the comment. This should be either * 'ASCII', 'JIS', 'Unicode', or the empty string specifying an * unknown encoding. */ public function setValue($comment = '', $encoding = 'ASCII') { $this->comment = $comment; $this->encoding = $encoding; parent::setValue(str_pad($encoding, 8, chr(0)) . $comment); }