Refactoring the code

git-svn-id: http://php-reader.googlecode.com/svn/trunk@140 51a70ab9-7547-0410-9469-37e369ee0574
This commit is contained in:
svollbehr
2009-02-19 14:30:29 +00:00
parent c6c10d7ce8
commit 4b68a78dc8
40 changed files with 552 additions and 432 deletions

View File

@@ -2,7 +2,8 @@
/**
* PHP Reader Library
*
* Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved.
* Copyright (c) 2008-2009 The PHP Reader Project Workgroup. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -30,7 +31,7 @@
*
* @package php-reader
* @subpackage ID3
* @copyright Copyright (c) 2008 The PHP Reader Project Workgroup
* @copyright Copyright (c) 2008-2009 The PHP Reader Project Workgroup
* @license http://code.google.com/p/php-reader/wiki/License New BSD License
* @version $Id$
* @since ID3v2.4.0
@@ -58,7 +59,7 @@ require_once("ID3/Frame.php");
* @subpackage ID3
* @author Sven Vollbehr <svollbehr@gmail.com>
* @author Ryan Butterfield <buttza@gmail.com>
* @copyright Copyright (c) 2008 The PHP Reader Project Workgroup
* @copyright Copyright (c) 2008-2009 The PHP Reader Project Workgroup
* @license http://code.google.com/p/php-reader/wiki/License New BSD License
* @version $Rev$
* @since ID3v2.4.0
@@ -117,7 +118,7 @@ final class ID3_Frame_RVA2 extends ID3_Frame
return;
list ($this->_device, $this->_data) =
$this->explodeString8($this->_data, 2);
$this->_explodeString8($this->_data, 2);
for ($i = $j = 0; $i < 9; $i++) {
$this->_adjustments[$i] = array
@@ -188,11 +189,11 @@ final class ID3_Frame_RVA2 extends ID3_Frame
}
/**
* Returns the frame raw data.
* Returns the frame raw data without the header.
*
* @return string
*/
public function __toString()
protected function _getData()
{
$data = $this->_device . "\0";
foreach ($this->_adjustments as $channel) {
@@ -211,7 +212,6 @@ final class ID3_Frame_RVA2 extends ID3_Frame
$data .= Transform::toInt8(64) .
Transform::toInt64BE($channel[self::peakVolume]); // UInt64
}
$this->setData($data);
return parent::__toString();
return $data;
}
}