diff --git a/src/ASF.php b/src/ASF.php index 30a7c7c..c8a62a0 100644 --- a/src/ASF.php +++ b/src/ASF.php @@ -1,6 +1,9 @@ - * @copyright Copyright (c) 2006, 2007 The Bearpaw Project Work Group - * @copyright Copyright (c) 2007, 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @author Sven Vollbehr + * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Rev$ */ class ASF @@ -105,8 +106,8 @@ class ASF { $object = false; if ($this->hasObjects()) { - $guid = $this->_reader->getGUID(); - $size = $this->_reader->getInt64LE(); + $guid = $this->_reader->readGUID(); + $size = $this->_reader->readInt64LE(); $offset = $this->_reader->getOffset(); switch ($guid) { diff --git a/src/ASF/ContentDescriptionObject.php b/src/ASF/ContentDescriptionObject.php index 76168e5..ed0fd2c 100644 --- a/src/ASF/ContentDescriptionObject.php +++ b/src/ASF/ContentDescriptionObject.php @@ -2,6 +2,9 @@ /** * PHP Reader Library * + * Copyright (c) 2006-2008 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: * @@ -10,7 +13,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +31,8 @@ * * @package php-reader * @subpackage ASF - * @copyright Copyright (c) 2006, 2007 The Bearpaw Project Work Group - * @copyright Copyright (c) 2007, 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -45,10 +47,9 @@ require_once("Object.php"); * * @package php-reader * @subpackage ASF - * @author Sven Vollbehr - * @copyright Copyright (c) 2006, 2007 The Bearpaw Project Work Group - * @copyright Copyright (c) 2007, 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @author Sven Vollbehr + * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Rev$ */ final class ASF_ContentDescriptionObject extends ASF_Object @@ -80,17 +81,17 @@ final class ASF_ContentDescriptionObject extends ASF_Object { parent::__construct($reader, $id, $size); - $titleLen = $this->_reader->getUInt16LE(); - $authorLen = $this->_reader->getUInt16LE(); - $copyrightLen = $this->_reader->getUInt16LE(); - $descriptionLen = $this->_reader->getUInt16LE(); - $ratingLen = $this->_reader->getUInt16LE(); + $titleLen = $this->_reader->readUInt16LE(); + $authorLen = $this->_reader->readUInt16LE(); + $copyrightLen = $this->_reader->readUInt16LE(); + $descriptionLen = $this->_reader->readUInt16LE(); + $ratingLen = $this->_reader->readUInt16LE(); - $this->_title = $this->_reader->getString16LE($titleLen); - $this->_author = $this->_reader->getString16LE($authorLen); - $this->_copyright = $this->_reader->getString16LE($copyrightLen); - $this->_description = $this->_reader->getString16LE($descriptionLen); - $this->_rating = $this->_reader->getString16LE($ratingLen); + $this->_title = $this->_reader->readString16LE($titleLen); + $this->_author = $this->_reader->readString16LE($authorLen); + $this->_copyright = $this->_reader->readString16LE($copyrightLen); + $this->_description = $this->_reader->readString16LE($descriptionLen); + $this->_rating = $this->_reader->readString16LE($ratingLen); } /** diff --git a/src/ASF/ExtendedContentDescriptionObject.php b/src/ASF/ExtendedContentDescriptionObject.php index b126561..d59bbce 100644 --- a/src/ASF/ExtendedContentDescriptionObject.php +++ b/src/ASF/ExtendedContentDescriptionObject.php @@ -2,6 +2,9 @@ /** * PHP Reader Library * + * Copyright (c) 2006-2008 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: * @@ -10,7 +13,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +31,8 @@ * * @package php-reader * @subpackage ASF - * @copyright Copyright (c) 2006, 2007 The Bearpaw Project Work Group - * @copyright Copyright (c) 2007, 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -45,10 +47,9 @@ require_once("Object.php"); * * @package php-reader * @subpackage ASF - * @author Sven Vollbehr - * @copyright Copyright (c) 2006, 2007 The Bearpaw Project Work Group - * @copyright Copyright (c) 2007, 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @author Sven Vollbehr + * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Rev$ */ final class ASF_ExtendedContentDescriptionObject extends ASF_Object @@ -68,27 +69,27 @@ final class ASF_ExtendedContentDescriptionObject extends ASF_Object { parent::__construct($reader, $id, $size); - $contentDescriptorsCount = $this->_reader->getUInt16LE(); + $contentDescriptorsCount = $this->_reader->readUInt16LE(); for ($i = 0; $i < $contentDescriptorsCount; $i++) { - $nameLen = $this->_reader->getUInt16LE(); - $name = $this->_reader->getString16LE($nameLen); - $valueDataType = $this->_reader->getUInt16LE(); - $valueLen = $this->_reader->getUInt16LE(); + $nameLen = $this->_reader->readUInt16LE(); + $name = $this->_reader->readString16LE($nameLen); + $valueDataType = $this->_reader->readUInt16LE(); + $valueLen = $this->_reader->readUInt16LE(); switch ($valueDataType) { case 0: case 1: // string $this->_contentDescriptors[$name] = - $this->_reader->getString16LE($valueLen); + $this->_reader->readString16LE($valueLen); break; case 2: // bool case 3: // 32-bit integer - $this->_contentDescriptors[$name] = $this->_reader->getUInt32LE(); + $this->_contentDescriptors[$name] = $this->_reader->readUInt32LE(); break; case 4: // 64-bit integer - $this->_contentDescriptors[$name] = $this->_reader->getInt64LE(); + $this->_contentDescriptors[$name] = $this->_reader->readInt64LE(); break; case 5: // 16-bit integer - $this->_contentDescriptors[$name] = $this->_reader->getUInt16LE(); + $this->_contentDescriptors[$name] = $this->_reader->readUInt16LE(); break; default: } diff --git a/src/ASF/FilePropertiesObject.php b/src/ASF/FilePropertiesObject.php index b736e4a..a1db3d7 100644 --- a/src/ASF/FilePropertiesObject.php +++ b/src/ASF/FilePropertiesObject.php @@ -2,6 +2,9 @@ /** * PHP Reader Library * + * Copyright (c) 2006-2008 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: * @@ -10,7 +13,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +31,8 @@ * * @package php-reader * @subpackage ASF - * @copyright Copyright (c) 2006, 2007 The Bearpaw Project Work Group - * @copyright Copyright (c) 2007, 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -44,10 +46,9 @@ require_once("Object.php"); * * @package php-reader * @subpackage ASF - * @author Sven Vollbehr - * @copyright Copyright (c) 2006, 2007 The Bearpaw Project Work Group - * @copyright Copyright (c) 2007, 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @author Sven Vollbehr + * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Rev$ */ final class ASF_FilePropertiesObject extends ASF_Object @@ -97,12 +98,12 @@ final class ASF_FilePropertiesObject extends ASF_Object { parent::__construct($reader, $id, $size); - $this->_fileId = $this->_reader->getGUID(); - $this->_fileSize = $this->_reader->getInt64LE(); - $this->_creationDate = $this->_reader->getInt64LE(); - $this->_dataPacketsCount = $this->_reader->getInt64LE(); + $this->_fileId = $this->_reader->readGUID(); + $this->_fileSize = $this->_reader->readInt64LE(); + $this->_creationDate = $this->_reader->readInt64LE(); + $this->_dataPacketsCount = $this->_reader->readInt64LE(); - $seconds = floor($this->_reader->getInt64LE() / 10000000); + $seconds = floor($this->_reader->readInt64LE() / 10000000); $minutes = floor($seconds / 60); $hours = floor($minutes / 60); $this->_playDuration = @@ -111,7 +112,7 @@ final class ASF_FilePropertiesObject extends ASF_Object str_pad($minutes % 60, 2, "0", STR_PAD_LEFT) : $minutes % 60) . ":" . str_pad($seconds % 60, 2, "0", STR_PAD_LEFT) : $seconds % 60); - $seconds = floor($this->_reader->getInt64LE() / 10000000); + $seconds = floor($this->_reader->readInt64LE() / 10000000); $minutes = floor($seconds / 60); $hours = floor($minutes / 60); $this->_sendDuration = @@ -120,11 +121,11 @@ final class ASF_FilePropertiesObject extends ASF_Object str_pad($minutes % 60, 2, "0", STR_PAD_LEFT) : $minutes % 60) . ":" . str_pad($seconds % 60, 2, "0", STR_PAD_LEFT) : $seconds % 60); - $this->_preroll = $this->_reader->getInt64LE(); - $this->_flags = $this->_reader->getUInt32LE(); - $this->_minimumDataPacketSize = $this->_reader->getUInt32LE(); - $this->_maximumDataPacketSize = $this->_reader->getUInt32LE(); - $this->_maximumBitrate = $this->_reader->getUInt32LE(); + $this->_preroll = $this->_reader->readInt64LE(); + $this->_flags = $this->_reader->readUInt32LE(); + $this->_minimumDataPacketSize = $this->_reader->readUInt32LE(); + $this->_maximumDataPacketSize = $this->_reader->readUInt32LE(); + $this->_maximumBitrate = $this->_reader->readUInt32LE(); } /** diff --git a/src/ASF/HeaderObject.php b/src/ASF/HeaderObject.php index 97c36dc..77cb75b 100644 --- a/src/ASF/HeaderObject.php +++ b/src/ASF/HeaderObject.php @@ -2,6 +2,9 @@ /** * PHP Reader Library * + * Copyright (c) 2006-2008 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: * @@ -10,7 +13,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +31,8 @@ * * @package php-reader * @subpackage ASF - * @copyright Copyright (c) 2006, 2007 The Bearpaw Project Work Group - * @copyright Copyright (c) 2007, 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -45,10 +47,9 @@ require_once("Object.php"); * * @package php-reader * @subpackage ASF - * @author Sven Vollbehr - * @copyright Copyright (c) 2006, 2007 The Bearpaw Project Work Group - * @copyright Copyright (c) 2007, 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @author Sven Vollbehr + * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Rev$ */ final class ASF_HeaderObject extends ASF_Object @@ -82,7 +83,7 @@ final class ASF_HeaderObject extends ASF_Object parent::__construct($reader, $id, $size); $this->_readerSOffset = $this->_reader->getOffset(); - $this->_objectCount = $this->_reader->getUInt32LE(); + $this->_objectCount = $this->_reader->readUInt32LE(); $this->_reader->skip(2); $this->_readerCOffset = $this->_reader->getOffset(); } @@ -119,8 +120,8 @@ final class ASF_HeaderObject extends ASF_Object $object = false; if ($this->hasChildObjects()) { $this->_reader->setOffset($this->_readerCOffset); - $guid = $this->_reader->getGUID(); - $size = $this->_reader->getInt64LE(); + $guid = $this->_reader->readGUID(); + $size = $this->_reader->readInt64LE(); $offset = $this->_reader->getOffset(); switch ($guid) { /* ASF_Content_Description_Object */ diff --git a/src/ASF/Object.php b/src/ASF/Object.php index 2a56536..fd3cb8c 100644 --- a/src/ASF/Object.php +++ b/src/ASF/Object.php @@ -2,6 +2,9 @@ /** * PHP Reader Library * + * Copyright (c) 2006-2008 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: * @@ -10,7 +13,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +31,8 @@ * * @package php-reader * @subpackage ASF - * @copyright Copyright (c) 2006, 2007 The Bearpaw Project Work Group - * @copyright Copyright (c) 2007, 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -39,10 +41,9 @@ * * @package php-reader * @subpackage ASF - * @author Sven Vollbehr - * @copyright Copyright (c) 2006, 2007 The Bearpaw Project Work Group - * @copyright Copyright (c) 2007, 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @author Sven Vollbehr + * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Rev$ */ class ASF_Object diff --git a/src/ID3/Encoding.php b/src/ID3/Encoding.php index 7c4b628..c0966d1 100644 --- a/src/ID3/Encoding.php +++ b/src/ID3/Encoding.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -39,9 +41,9 @@ * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ interface ID3_Encoding @@ -52,6 +54,9 @@ interface ID3_Encoding /** The UTF-16 Unicode encoding with BOM. */ const UTF16 = 1; + /** The UTF-16 Unicode encoding with BOM. */ + const UTF16LE = 1; + /** The UTF-16BE Unicode encoding without BOM. */ const UTF16BE = 2; diff --git a/src/ID3/Exception.php b/src/ID3/Exception.php index 5628a59..95d55d2 100644 --- a/src/ID3/Exception.php +++ b/src/ID3/Exception.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,20 +30,20 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ /** - * The ID3_Exception is thrown whenever an error occurs within the ID3v1 or the - * ID3v2 classes. + * The ID3_Exception is thrown whenever an error occurs within the {@link ID3v1} + * or the {@link ID3v2} classes. * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ class ID3_Exception extends Exception diff --git a/src/ID3/ExtendedHeader.php b/src/ID3/ExtendedHeader.php index f70ebf5..a7648a0 100644 --- a/src/ID3/ExtendedHeader.php +++ b/src/ID3/ExtendedHeader.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -44,9 +46,9 @@ require_once("Object.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_ExtendedHeader extends ID3_Object @@ -94,10 +96,10 @@ final class ID3_ExtendedHeader extends ID3_Object { parent::__construct($reader); - $offset = $this->_reader->getOffset(); - $this->_size = $this->decodeSynchsafe32($this->_reader->getUInt32BE()); + $offset = $this->_reader->offset; + $this->_size = $this->decodeSynchsafe32($this->_reader->readUInt32BE()); $this->_reader->skip(1); - $this->_flags = $this->_reader->getInt8(); + $this->_flags = $this->_reader->readInt8(); if ($this->hasFlag(self::UPDATE)) $this->_reader->skip(1); @@ -109,10 +111,10 @@ final class ID3_ExtendedHeader extends ID3_Object } if ($this->hasFlag(self::RESTRICTED)) { $this->_reader->skip(1); - $this->_restrictions = $this->_reader->getInt8(1); + $this->_restrictions = $this->_reader->readInt8(1); } - $this->_reader->skip($this->_size - $this->_reader->getOffset() - $offset); + $this->_reader->skip($this->_size - $this->_reader->offset - $offset); } /** diff --git a/src/ID3/Frame.php b/src/ID3/Frame.php index 81d9994..9af49f0 100644 --- a/src/ID3/Frame.php +++ b/src/ID3/Frame.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -44,9 +46,9 @@ require_once("Object.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ class ID3_Frame extends ID3_Object @@ -138,9 +140,9 @@ class ID3_Frame extends ID3_Object { parent::__construct($reader); - $this->_identifier = $this->_reader->getString8(4); - $this->_size = $this->decodeSynchsafe32($this->_reader->getUInt32BE()); - $this->_flags = $this->_reader->getUInt16BE(); + $this->_identifier = $this->_reader->readString8(4); + $this->_size = $this->decodeSynchsafe32($this->_reader->readUInt32BE()); + $this->_flags = $this->_reader->readUInt16BE(); $this->_data = $this->_reader->read($this->_size); } @@ -150,7 +152,17 @@ class ID3_Frame extends ID3_Object * @return string */ public function getIdentifier() { return $this->_identifier; } - + + /** + * Sets the frame identifier. + * + * @param string $identifier The identifier. + */ + public function setIdentifier($identifier) + { + $this->_identifier = $identifier; + } + /** * Returns the size of the data in the final frame, after encryption, * compression and unsynchronisation. The size is excluding the frame header. @@ -158,7 +170,7 @@ class ID3_Frame extends ID3_Object * @return integer */ public function getSize() { return $this->_size; } - + /** * Checks whether or not the flag is set. Returns true if the flag * is set, false otherwise. @@ -167,4 +179,24 @@ class ID3_Frame extends ID3_Object * @return boolean */ public function hasFlag($flag) { return ($this->_flags & $flag) == $flag; } + + /** + * Returns the frame flags byte. + * + * @return integer + */ + public function getFlags($flags) + { + return $this->_flags; + } + + /** + * Sets the frame flags byte. + * + * @param string $flags The flags byte. + */ + public function setFlags($flags) + { + $this->_flags = $flags; + } } diff --git a/src/ID3/Frame/AENC.php b/src/ID3/Frame/AENC.php index 3d7ce76..2693e50 100644 --- a/src/ID3/Frame/AENC.php +++ b/src/ID3/Frame/AENC.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -50,9 +52,9 @@ require_once("ID3/Frame.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_AENC extends ID3_Frame diff --git a/src/ID3/Frame/APIC.php b/src/ID3/Frame/APIC.php index 1140c25..ffff12b 100644 --- a/src/ID3/Frame/APIC.php +++ b/src/ID3/Frame/APIC.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -53,9 +55,9 @@ require_once("ID3/Encoding.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_APIC extends ID3_Frame @@ -105,18 +107,14 @@ final class ID3_Frame_APIC extends ID3_Frame switch ($this->_encoding) { case self::UTF16: - $bom = substr($this->_data, 0, 2); - $this->_data = substr($this->_data, 2); - if ($bom == 0xfffe) { - list ($this->_description, $this->_data) = - preg_split("/\\x00\\x00/", $this->_data, 2); - $this->_description = Transform::getString16LE($this->_description); - break; - } + list ($this->_description, $this->_data) = + preg_split("/\\x00\\x00/", $this->_data, 2); + $this->_description = Transform::fromString16($this->_description); + break; case self::UTF16BE: list ($this->_description, $this->_data) = preg_split("/\\x00\\x00/", $this->_data, 2); - $this->_description = Transform::getString16BE($this->_description); + $this->_description = Transform::fromString16BE($this->_description); break; default: list ($this->_description, $this->_data) = diff --git a/src/ID3/Frame/ASPI.php b/src/ID3/Frame/ASPI.php index bebed1e..98269c7 100644 --- a/src/ID3/Frame/ASPI.php +++ b/src/ID3/Frame/ASPI.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +30,10 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ + * @since ID3v2.4.0 */ /**#@+ @ignore */ @@ -49,10 +52,11 @@ require_once("ID3/Frame.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ + * @since ID3v2.4.0 */ final class ID3_Frame_ASPI extends ID3_Frame { @@ -77,9 +81,9 @@ final class ID3_Frame_ASPI extends ID3_Frame { parent::__construct($reader); - $this->_dataStart = Transform::getInt32BE(substr($this->_data, 0, 4)); - $this->_dataLength = Transform::getInt32BE(substr($this->_data, 4, 4)); - $this->_size = Transform::getInt16BE(substr($this->_data, 8, 2)); + $this->_dataStart = Transform::fromInt32BE(substr($this->_data, 0, 4)); + $this->_dataLength = Transform::fromInt32BE(substr($this->_data, 4, 4)); + $this->_size = Transform::fromInt16BE(substr($this->_data, 8, 2)); $bitsPerPoint = substr($this->_data, 10, 1); for ($i = 0, $offset = 11; $i < $this->_size; $i++) { if ($bitsPerPoint == 16) { diff --git a/src/ID3/Frame/AbstractLink.php b/src/ID3/Frame/AbstractLink.php index 4096e8a..5120923 100644 --- a/src/ID3/Frame/AbstractLink.php +++ b/src/ID3/Frame/AbstractLink.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -42,9 +44,9 @@ require_once("ID3/Frame.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ abstract class ID3_Frame_AbstractLink extends ID3_Frame diff --git a/src/ID3/Frame/AbstractText.php b/src/ID3/Frame/AbstractText.php index 2b3e235..dae85dd 100644 --- a/src/ID3/Frame/AbstractText.php +++ b/src/ID3/Frame/AbstractText.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("ID3/Encoding.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ abstract class ID3_Frame_AbstractText extends ID3_Frame @@ -70,19 +72,16 @@ abstract class ID3_Frame_AbstractText extends ID3_Frame $this->_data = substr($this->_data, 1); switch ($this->_encoding) { case self::UTF16: - $bom = substr($this->_data, 0, 2); - $this->_data = substr($this->_data, 2); - if ($bom == 0xfffe) { - $this->_text = - preg_split("/\\x00\\x00/", Transform::getString16LE($this->_data)); - break; - } + $this->_text = + preg_split("/\\x00\\x00/", Transform::fromString16($this->_data)); + break; case self::UTF16BE: $this->_text = - preg_split("/\\x00\\x00/", Transform::getString16BE($this->_data)); + preg_split("/\\x00\\x00/", Transform::fromString16BE($this->_data)); break; default: - $this->_text = preg_split("/\\x00/", Transform::getString8($this->_data)); + $this->_text = + preg_split("/\\x00/", Transform::fromString8($this->_data)); } } diff --git a/src/ID3/Frame/COMM.php b/src/ID3/Frame/COMM.php index 2445294..8764468 100644 --- a/src/ID3/Frame/COMM.php +++ b/src/ID3/Frame/COMM.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -49,9 +51,9 @@ require_once("ID3/Language.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_COMM extends ID3_Frame @@ -84,26 +86,22 @@ final class ID3_Frame_COMM extends ID3_Frame switch ($this->_encoding) { case self::UTF16: - $bom = substr($this->_data, 0, 2); - $this->_data = substr($this->_data, 2); - if ($bom == 0xfffe) { - list ($this->_description, $this->_text) = - preg_split("/\\x00\\x00/", $this->_data, 2); - $this->_description = Transform::getString16LE($this->_description); - $this->_text = Transform::getString16LE($this->_text); - break; - } + list ($this->_description, $this->_text) = + preg_split("/\\x00\\x00/", $this->_data, 2); + $this->_description = Transform::fromString16($this->_description); + $this->_text = Transform::fromString16($this->_text); + break; case self::UTF16BE: list ($this->_description, $this->_text) = preg_split("/\\x00\\x00/", $this->_data, 2); - $this->_description = Transform::getString16BE($this->_description); - $this->_text = Transform::getString16BE($this->_text); + $this->_description = Transform::fromString16BE($this->_description); + $this->_text = Transform::fromString16BE($this->_text); break; default: list ($this->_description, $this->_text) = preg_split("/\\x00/", $this->_data, 2); - $this->_description = Transform::getString8($this->_description); - $this->_text = Transform::getString8($this->_text); + $this->_description = Transform::fromString8($this->_description); + $this->_text = Transform::fromString8($this->_text); } } diff --git a/src/ID3/Frame/COMR.php b/src/ID3/Frame/COMR.php index 6d9480d..de8356e 100644 --- a/src/ID3/Frame/COMR.php +++ b/src/ID3/Frame/COMR.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -49,9 +51,9 @@ require_once("ID3/Encoding.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_COMR extends ID3_Frame @@ -117,26 +119,22 @@ final class ID3_Frame_COMR extends ID3_Frame switch ($this->_encoding) { case self::UTF16: - $bom = substr($this->_data, 0, 2); - $this->_data = substr($this->_data, 2); - if ($bom == 0xfffe) { - list ($this->_seller, $this->_description, $this->_data) = - preg_split("/\\x00\\x00/", $this->_data, 3); - $this->_seller = Transform::getString16LE($this->_seller); - $this->_description = Transform::getString16LE($this->_description); - break; - } + list ($this->_seller, $this->_description, $this->_data) = + preg_split("/\\x00\\x00/", $this->_data, 3); + $this->_seller = Transform::fromString16($this->_seller); + $this->_description = Transform::fromString16($this->_description); + break; case self::UTF16BE: list ($this->_seller, $this->_description, $this->_data) = preg_split("/\\x00\\x00/", $this->_data, 3); - $this->_seller = Transform::getString16BE($this->_seller); - $this->_description = Transform::getString16BE($this->_description); + $this->_seller = Transform::fromString16BE($this->_seller); + $this->_description = Transform::fromString16BE($this->_description); break; default: list ($this->_seller, $this->_description, $this->_data) = preg_split("/\\x00/", $this->_data, 3); - $this->_seller = Transform::getString8($this->_seller); - $this->_description = Transform::getString8($this->_description); + $this->_seller = Transform::fromString8($this->_seller); + $this->_description = Transform::fromString8($this->_description); } if (strlen($this->_data) == 0) diff --git a/src/ID3/Frame/ENCR.php b/src/ID3/Frame/ENCR.php index 0f273cb..992caa2 100644 --- a/src/ID3/Frame/ENCR.php +++ b/src/ID3/Frame/ENCR.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -59,9 +61,9 @@ require_once("ID3/Frame.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_ENCR extends ID3_Frame diff --git a/src/ID3/Frame/EQU2.php b/src/ID3/Frame/EQU2.php index 677d359..3eb670a 100644 --- a/src/ID3/Frame/EQU2.php +++ b/src/ID3/Frame/EQU2.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +30,10 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ + * @since ID3v2.4.0 */ /**#@+ @ignore */ @@ -45,10 +48,11 @@ require_once("ID3/Frame.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ + * @since ID3v2.4.0 */ final class ID3_Frame_EQU2 extends ID3_Frame { @@ -88,8 +92,8 @@ final class ID3_Frame_EQU2 extends ID3_Frame preg_split("/\\x00/", substr($this->_data, 1), 2); for ($i = 0; $i < strlen($this->_data); $i += 8) - $this->_adjustments[Transform::getInt16BE(substr($this->_data, $j, 2))] = - Transform::getInt16BE(substr($this->_data, $j + 2, 2)); + $this->_adjustments[Transform::fromInt16BE(substr($this->_data, $j, 2))] = + Transform::fromInt16BE(substr($this->_data, $j + 2, 2)); sort($this->_adjustments); } diff --git a/src/ID3/Frame/ETCO.php b/src/ID3/Frame/ETCO.php index 2bd0a13..982fd0f 100644 --- a/src/ID3/Frame/ETCO.php +++ b/src/ID3/Frame/ETCO.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -54,9 +56,9 @@ require_once("ID3/Timing.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_ETCO extends ID3_Frame @@ -100,7 +102,7 @@ final class ID3_Frame_ETCO extends ID3_Frame $this->_format = ord($this->_data{0}); for ($i = 1; $i < $this->getSize(); $i += 5) { - $this->_events[Transform::getInt32BE(substr($this->_data, $i + 1, 4))] = + $this->_events[Transform::fromInt32BE(substr($this->_data, $i + 1, 4))] = $data = $this->_data{$i}; if ($data == 0xff) break; diff --git a/src/ID3/Frame/GEOB.php b/src/ID3/Frame/GEOB.php index 1e21126..74c5a62 100644 --- a/src/ID3/Frame/GEOB.php +++ b/src/ID3/Frame/GEOB.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -44,9 +46,9 @@ require_once("ID3/Encoding.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_GEOB extends ID3_Frame @@ -80,26 +82,22 @@ final class ID3_Frame_GEOB extends ID3_Frame switch ($this->_encoding) { case self::UTF16: - $bom = substr($this->_data, 0, 2); - $this->_data = substr($this->_data, 2); - if ($bom == 0xfffe) { - list ($this->_filename, $this->_description, $this->_data) = - preg_split("/\\x00\\x00/", $this->_data, 3); - $this->_filename = Transform::getString16LE($this->_filename); - $this->_description = Transform::getString16LE($this->_description); - break; - } + list ($this->_filename, $this->_description, $this->_data) = + preg_split("/\\x00\\x00/", $this->_data, 3); + $this->_filename = Transform::fromString16($this->_filename); + $this->_description = Transform::fromString16($this->_description); + break; case self::UTF16BE: list ($this->_filename, $this->_description, $this->_data) = preg_split("/\\x00\\x00/", $this->_data, 3); - $this->_filename = Transform::getString16BE($this->_filename); - $this->_description = Transform::getString16BE($this->_description); + $this->_filename = Transform::fromString16BE($this->_filename); + $this->_description = Transform::fromString16BE($this->_description); break; default: list ($this->_filename, $this->_description, $this->_data) = preg_split("/\\x00/", $this->_data, 3); - $this->_filename = Transform::getString8($this->_filename); - $this->_description = Transform::getString8($this->_description); + $this->_filename = Transform::fromString8($this->_filename); + $this->_description = Transform::fromString8($this->_description); } } diff --git a/src/ID3/Frame/GRID.php b/src/ID3/Frame/GRID.php index 345b5cc..53bb985 100644 --- a/src/ID3/Frame/GRID.php +++ b/src/ID3/Frame/GRID.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -58,9 +60,9 @@ require_once("ID3/Frame.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_GRID extends ID3_Frame diff --git a/src/ID3/Frame/LINK.php b/src/ID3/Frame/LINK.php index 1783325..2039e06 100644 --- a/src/ID3/Frame/LINK.php +++ b/src/ID3/Frame/LINK.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -76,9 +78,9 @@ require_once("ID3/Frame.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_LINK extends ID3_Frame diff --git a/src/ID3/Frame/MCDI.php b/src/ID3/Frame/MCDI.php index 58289cc..be2d4ee 100644 --- a/src/ID3/Frame/MCDI.php +++ b/src/ID3/Frame/MCDI.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -53,9 +55,9 @@ require_once("ID3/Frame.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_MCDI extends ID3_Frame diff --git a/src/ID3/Frame/MLLT.php b/src/ID3/Frame/MLLT.php index c80abbe..e245175 100644 --- a/src/ID3/Frame/MLLT.php +++ b/src/ID3/Frame/MLLT.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -59,9 +61,9 @@ require_once("ID3/Frame.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_MLLT extends ID3_Frame @@ -87,9 +89,9 @@ final class ID3_Frame_MLLT extends ID3_Frame { parent::__construct($reader); - $this->_frames = Transform::getInt16BE(substr($this->_data, 0, 2)); - $this->_bytes = Transform::getInt32BE(substr($this->_data, 2, 3)); - $this->_milliseconds = Transform::getInt32BE(substr($this->_data, 5, 3)); + $this->_frames = Transform::fromInt16BE(substr($this->_data, 0, 2)); + $this->_bytes = Transform::fromInt32BE(substr($this->_data, 2, 3)); + $this->_milliseconds = Transform::fromInt32BE(substr($this->_data, 5, 3)); $byteDevBits = ord(substr($this->_data, 8, 1)); $millisDevBits = ord(substr($this->_data, 9, 1)); diff --git a/src/ID3/Frame/OWNE.php b/src/ID3/Frame/OWNE.php index 3e00a98..e010a0b 100644 --- a/src/ID3/Frame/OWNE.php +++ b/src/ID3/Frame/OWNE.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -47,9 +49,9 @@ require_once("ID3/Encoding.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_OWNE extends ID3_Frame @@ -88,17 +90,13 @@ final class ID3_Frame_OWNE extends ID3_Frame switch ($this->_encoding) { case self::UTF16: - $bom = substr($this->_data, 0, 2); - $this->_data = substr($this->_data, 2); - if ($bom == 0xfffe) { - $this->_seller = Transform::getString16LE($this->_data); - break; - } + $this->_seller = Transform::fromString16($this->_data); + break; case self::UTF16BE: - $this->_seller = Transform::getString16BE($this->_data); + $this->_seller = Transform::fromString16BE($this->_data); break; default: - $this->_seller = Transform::getString8($this->_data); + $this->_seller = Transform::fromString8($this->_data); } } diff --git a/src/ID3/Frame/PCNT.php b/src/ID3/Frame/PCNT.php index caad931..0e30c4b 100644 --- a/src/ID3/Frame/PCNT.php +++ b/src/ID3/Frame/PCNT.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -44,9 +46,9 @@ require_once("ID3/Frame.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_PCNT extends ID3_Frame @@ -65,10 +67,10 @@ final class ID3_Frame_PCNT extends ID3_Frame switch (strlen($this->_data)) { case 8: - $this->_counter = Transform::getInt64BE($this->_data); + $this->_counter = Transform::fromInt64BE($this->_data); break; case 4: - $this->_counter = Transform::getInt32BE($this->_data); + $this->_counter = Transform::fromInt32BE($this->_data); break; } } diff --git a/src/ID3/Frame/POPM.php b/src/ID3/Frame/POPM.php index e0fa977..c1bb149 100644 --- a/src/ID3/Frame/POPM.php +++ b/src/ID3/Frame/POPM.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -55,9 +57,9 @@ require_once("ID3/Frame.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_POPM extends ID3_Frame @@ -86,10 +88,10 @@ final class ID3_Frame_POPM extends ID3_Frame switch (strlen($this->_data)) { case 8: - $this->_counter = Transform::getInt64BE($this->_data); + $this->_counter = Transform::fromInt64BE($this->_data); break; case 4: - $this->_counter = Transform::getInt32BE($this->_data); + $this->_counter = Transform::fromInt32BE($this->_data); break; } } diff --git a/src/ID3/Frame/POSS.php b/src/ID3/Frame/POSS.php index 9ed28b2..d2770ed 100644 --- a/src/ID3/Frame/POSS.php +++ b/src/ID3/Frame/POSS.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -46,9 +48,9 @@ require_once("ID3/Timing.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_POSS extends ID3_Frame @@ -70,7 +72,7 @@ final class ID3_Frame_POSS extends ID3_Frame parent::__construct($reader); $this->_format = ord($this->_data{0}); - $this->_position = Transform::getInt32BE(substr($this->_data, 1, 4)); + $this->_position = Transform::fromInt32BE(substr($this->_data, 1, 4)); } /** diff --git a/src/ID3/Frame/PRIV.php b/src/ID3/Frame/PRIV.php index 89333d2..617ad94 100644 --- a/src/ID3/Frame/PRIV.php +++ b/src/ID3/Frame/PRIV.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -49,9 +51,9 @@ require_once("ID3/Frame.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_PRIV extends ID3_Frame diff --git a/src/ID3/Frame/RBUF.php b/src/ID3/Frame/RBUF.php index 3d6f68e..c020763 100644 --- a/src/ID3/Frame/RBUF.php +++ b/src/ID3/Frame/RBUF.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -63,9 +65,9 @@ require_once("ID3/Frame.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_RBUF extends ID3_Frame @@ -94,9 +96,9 @@ final class ID3_Frame_RBUF extends ID3_Frame { parent::__construct($reader); - $this->_size = Transform::getInt32BE(substr($this->_data, 0, 3)); + $this->_size = Transform::fromInt32BE(substr($this->_data, 0, 3)); $this->_flags = substr($this->_data, 3, 1); - $this->_offset = Transform::getInt32BE(substr($this->_data, 4, 4)); + $this->_offset = Transform::fromInt32BE(substr($this->_data, 4, 4)); } /** diff --git a/src/ID3/Frame/RVA2.php b/src/ID3/Frame/RVA2.php index 2655907..5904975 100644 --- a/src/ID3/Frame/RVA2.php +++ b/src/ID3/Frame/RVA2.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +30,10 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ + * @since ID3v2.4.0 */ /**#@+ @ignore */ @@ -53,10 +56,11 @@ require_once("ID3/Frame.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ + * @since ID3v2.4.0 */ final class ID3_Frame_RVA2 extends ID3_Frame { @@ -98,24 +102,24 @@ final class ID3_Frame_RVA2 extends ID3_Frame $this->_adjustments[$i] = array ("channelType" => substr($this->_data, $j++, 1), "volumeAdjustment" => - Transform::getInt16BE(substr($this->_data, $j++, 2))); + Transform::fromInt16BE(substr($this->_data, $j++, 2))); $bitsInPeak = ord(substr($this->_data, (++$j)++, 1)); $bytesInPeak = $bitsInPeak > 0 ? ceil($bitsInPeak / 8) : 0; switch ($bytesInPeak) { case 32: case 24: $this->_adjustments[$i]["peakVolume"] = - Transform::getInt32BE(substr($this->_data, $j, $bytesInPeak)); + Transform::fromInt32BE(substr($this->_data, $j, $bytesInPeak)); $j += $bytesInPeak; break; case 16: $this->_adjustments[$i]["peakVolume"] = - Transform::getInt16BE(substr($this->_data, $j, $bytesInPeak)); + Transform::fromInt16BE(substr($this->_data, $j, $bytesInPeak)); $j += $bytesInPeak; break; case 8: $this->_adjustments[$i]["peakVolume"] = - Transform::getInt8(substr($this->_data, $j, $bytesInPeak)); + Transform::fromInt8(substr($this->_data, $j, $bytesInPeak)); $j += $bytesInPeak; } } diff --git a/src/ID3/Frame/RVRB.php b/src/ID3/Frame/RVRB.php index 14ec764..b3cba72 100644 --- a/src/ID3/Frame/RVRB.php +++ b/src/ID3/Frame/RVRB.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -56,9 +58,9 @@ require_once("ID3/Frame.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_RVRB extends ID3_Frame diff --git a/src/ID3/Frame/SEEK.php b/src/ID3/Frame/SEEK.php index 757f17a..5e9be27 100644 --- a/src/ID3/Frame/SEEK.php +++ b/src/ID3/Frame/SEEK.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +30,10 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ + * @since ID3v2.4.0 */ /**#@+ @ignore */ @@ -44,10 +47,11 @@ require_once("ID3/Frame.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ + * @since ID3v2.4.0 */ final class ID3_Frame_SEEK extends ID3_Frame { @@ -63,7 +67,7 @@ final class ID3_Frame_SEEK extends ID3_Frame { parent::__construct($reader); - $this->_minOffset = Transform::getInt32BE($this->_data); + $this->_minOffset = Transform::fromInt32BE($this->_data); } /** diff --git a/src/ID3/Frame/SIGN.php b/src/ID3/Frame/SIGN.php index fd164f1..bdef371 100644 --- a/src/ID3/Frame/SIGN.php +++ b/src/ID3/Frame/SIGN.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +30,10 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ + * @since ID3v2.4.0 */ /**#@+ @ignore */ @@ -46,10 +49,11 @@ require_once("ID3/Frame.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ + * @since ID3v2.4.0 */ final class ID3_Frame_SIGN extends ID3_Frame { diff --git a/src/ID3/Frame/SYLT.php b/src/ID3/Frame/SYLT.php index 844625f..2f9f0c7 100644 --- a/src/ID3/Frame/SYLT.php +++ b/src/ID3/Frame/SYLT.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -51,12 +53,12 @@ require_once("ID3/Timing.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ -final class ID3_Frame_USER extends ID3_Frame +final class ID3_Frame_SYLT extends ID3_Frame implements ID3_Encoding, ID3_Language, ID3_Timing { /** @@ -103,23 +105,19 @@ final class ID3_Frame_USER extends ID3_Frame switch ($this->_encoding) { case self::UTF16: - $bom = substr($this->_data, 0, 2); - $this->_data = substr($this->_data, 2); - if ($bom == 0xfffe) { - list($this->_description, $this->_data) = - preg_split("/\\x00\\x00/", $this->_data, 2); - $this->_description = Transform::getString16LE($this->_description); - break; - } + list($this->_description, $this->_data) = + preg_split("/\\x00\\x00/", $this->_data, 2); + $this->_description = Transform::fromString16($this->_description); + break; case self::UTF16BE: list($this->_description, $this->_data) = preg_split("/\\x00\\x00/", $this->_data, 2); - $this->_description = Transform::getString16BE($this->_description); + $this->_description = Transform::fromString16BE($this->_description); break; default: list($this->_description, $this->_data) = preg_split("/\\x00/", $this->_data, 2); - $this->_description = Transform::getString8($this->_description); + $this->_description = Transform::fromString8($this->_description); } $this->_text = $this->_data; // FIXME: Better parsing of data diff --git a/src/ID3/Frame/SYTC.php b/src/ID3/Frame/SYTC.php index d8700ae..e489df1 100644 --- a/src/ID3/Frame/SYTC.php +++ b/src/ID3/Frame/SYTC.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -58,9 +60,9 @@ require_once("ID3/Timing.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_SYTC extends ID3_Frame diff --git a/src/ID3/Frame/TALB.php b/src/ID3/Frame/TALB.php index 2e646ac..74d8a67 100644 --- a/src/ID3/Frame/TALB.php +++ b/src/ID3/Frame/TALB.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TALB extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TBPM.php b/src/ID3/Frame/TBPM.php index 2ff48c8..e679e8e 100644 --- a/src/ID3/Frame/TBPM.php +++ b/src/ID3/Frame/TBPM.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TBPM extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TCOM.php b/src/ID3/Frame/TCOM.php index 0e0581e..eb6de22 100644 --- a/src/ID3/Frame/TCOM.php +++ b/src/ID3/Frame/TCOM.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -42,9 +44,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TCOM extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TCON.php b/src/ID3/Frame/TCON.php index e01c847..858fc9f 100644 --- a/src/ID3/Frame/TCON.php +++ b/src/ID3/Frame/TCON.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -52,9 +54,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TCON extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TCOP.php b/src/ID3/Frame/TCOP.php index 21b504d..882eab4 100644 --- a/src/ID3/Frame/TCOP.php +++ b/src/ID3/Frame/TCOP.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -49,9 +51,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TCOP extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TDEN.php b/src/ID3/Frame/TDEN.php index 69e1b87..2499d7d 100644 --- a/src/ID3/Frame/TDEN.php +++ b/src/ID3/Frame/TDEN.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +30,10 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ + * @since ID3v2.4.0 */ /**#@+ @ignore */ @@ -44,9 +47,10 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ + * @since ID3v2.4.0 */ final class ID3_Frame_TDEN extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TDLY.php b/src/ID3/Frame/TDLY.php index e815c57..4f192e7 100644 --- a/src/ID3/Frame/TDLY.php +++ b/src/ID3/Frame/TDLY.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -44,9 +46,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TDLY extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TDOR.php b/src/ID3/Frame/TDOR.php index 812f0bb..39ae270 100644 --- a/src/ID3/Frame/TDOR.php +++ b/src/ID3/Frame/TDOR.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +30,10 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ + * @since ID3v2.4.0 */ /**#@+ @ignore */ @@ -45,9 +48,10 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ + * @since ID3v2.4.0 */ final class ID3_Frame_TDOR extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TDRC.php b/src/ID3/Frame/TDRC.php index 0573bf5..c727586 100644 --- a/src/ID3/Frame/TDRC.php +++ b/src/ID3/Frame/TDRC.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +30,10 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ + * @since ID3v2.4.0 */ /**#@+ @ignore */ @@ -44,9 +47,10 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ + * @since ID3v2.4.0 */ final class ID3_Frame_TDRC extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TDRL.php b/src/ID3/Frame/TDRL.php index 45129f5..eec36db 100644 --- a/src/ID3/Frame/TDRL.php +++ b/src/ID3/Frame/TDRL.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +30,10 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ + * @since ID3v2.4.0 */ /**#@+ @ignore */ @@ -44,9 +47,10 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ + * @since ID3v2.4.0 */ final class ID3_Frame_TDRL extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TDTG.php b/src/ID3/Frame/TDTG.php index 4ee842b..bf418de 100644 --- a/src/ID3/Frame/TDTG.php +++ b/src/ID3/Frame/TDTG.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +30,10 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ + * @since ID3v2.4.0 */ /**#@+ @ignore */ @@ -44,9 +47,10 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ + * @since ID3v2.4.0 */ final class ID3_Frame_TDTG extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TENC.php b/src/ID3/Frame/TENC.php index 08ef695..c6759a5 100644 --- a/src/ID3/Frame/TENC.php +++ b/src/ID3/Frame/TENC.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -44,9 +46,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TENC extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TEXT.php b/src/ID3/Frame/TEXT.php index 3f5c631..c943288 100644 --- a/src/ID3/Frame/TEXT.php +++ b/src/ID3/Frame/TEXT.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TEXT extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TFLT.php b/src/ID3/Frame/TFLT.php index 98b9370..ee0b9b7 100644 --- a/src/ID3/Frame/TFLT.php +++ b/src/ID3/Frame/TFLT.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -59,9 +61,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TFLT extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TIPL.php b/src/ID3/Frame/TIPL.php index d83b278..9c41952 100644 --- a/src/ID3/Frame/TIPL.php +++ b/src/ID3/Frame/TIPL.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +30,10 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ + * @since ID3v2.4.0 */ /**#@+ @ignore */ @@ -43,9 +46,10 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ + * @since ID3v2.4.0 */ final class ID3_Frame_TIPL extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TIT1.php b/src/ID3/Frame/TIT1.php index bc31ca8..40d0f8c 100644 --- a/src/ID3/Frame/TIT1.php +++ b/src/ID3/Frame/TIT1.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -44,9 +46,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TIT1 extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TIT2.php b/src/ID3/Frame/TIT2.php index 4bd2140..8bcc6fc 100644 --- a/src/ID3/Frame/TIT2.php +++ b/src/ID3/Frame/TIT2.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TIT2 extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TIT3.php b/src/ID3/Frame/TIT3.php index 4203739..fd5e789 100644 --- a/src/ID3/Frame/TIT3.php +++ b/src/ID3/Frame/TIT3.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -44,9 +46,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TIT3 extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TKEY.php b/src/ID3/Frame/TKEY.php index 66aa838..6687c49 100644 --- a/src/ID3/Frame/TKEY.php +++ b/src/ID3/Frame/TKEY.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -46,9 +48,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TKEY extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TLAN.php b/src/ID3/Frame/TLAN.php index 8bff396..5a973fe 100644 --- a/src/ID3/Frame/TLAN.php +++ b/src/ID3/Frame/TLAN.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -47,9 +49,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TLAN extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TLEN.php b/src/ID3/Frame/TLEN.php index 750eb24..652cc9d 100644 --- a/src/ID3/Frame/TLEN.php +++ b/src/ID3/Frame/TLEN.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TLEN extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TMCL.php b/src/ID3/Frame/TMCL.php index badfbdc..0051618 100644 --- a/src/ID3/Frame/TMCL.php +++ b/src/ID3/Frame/TMCL.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +30,10 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ + * @since ID3v2.4.0 */ /**#@+ @ignore */ @@ -44,9 +47,10 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ + * @since ID3v2.4.0 */ final class ID3_Frame_TMCL extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TMED.php b/src/ID3/Frame/TMED.php index 7e3c94a..5e1ad0c 100644 --- a/src/ID3/Frame/TMED.php +++ b/src/ID3/Frame/TMED.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -127,9 +129,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TMED extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TMOO.php b/src/ID3/Frame/TMOO.php index 89975ac..cde8358 100644 --- a/src/ID3/Frame/TMOO.php +++ b/src/ID3/Frame/TMOO.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +30,10 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ + * @since ID3v2.4.0 */ /**#@+ @ignore */ @@ -43,9 +46,10 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ + * @since ID3v2.4.0 */ final class ID3_Frame_TMOO extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TOAL.php b/src/ID3/Frame/TOAL.php index fd1e940..1827147 100644 --- a/src/ID3/Frame/TOAL.php +++ b/src/ID3/Frame/TOAL.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -44,9 +46,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TOAL extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TOFN.php b/src/ID3/Frame/TOFN.php index 5b5ae3f..8db2f6f 100644 --- a/src/ID3/Frame/TOFN.php +++ b/src/ID3/Frame/TOFN.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -44,9 +46,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TOFN extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TOLY.php b/src/ID3/Frame/TOLY.php index 75dbe30..9d76203 100644 --- a/src/ID3/Frame/TOLY.php +++ b/src/ID3/Frame/TOLY.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -44,9 +46,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TOLY extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TOPE.php b/src/ID3/Frame/TOPE.php index 26ba5cf..6e4b895 100644 --- a/src/ID3/Frame/TOPE.php +++ b/src/ID3/Frame/TOPE.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -44,9 +46,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TOPE extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TOWN.php b/src/ID3/Frame/TOWN.php index 0eff873..7f206e4 100644 --- a/src/ID3/Frame/TOWN.php +++ b/src/ID3/Frame/TOWN.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TOWN extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TPE1.php b/src/ID3/Frame/TPE1.php index 60be012..2cb5c1a 100644 --- a/src/ID3/Frame/TPE1.php +++ b/src/ID3/Frame/TPE1.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TPE1 extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TPE2.php b/src/ID3/Frame/TPE2.php index 287a6c1..0c8af67 100644 --- a/src/ID3/Frame/TPE2.php +++ b/src/ID3/Frame/TPE2.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TPE2 extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TPE3.php b/src/ID3/Frame/TPE3.php index 59a5ee5..2b43763 100644 --- a/src/ID3/Frame/TPE3.php +++ b/src/ID3/Frame/TPE3.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -42,9 +44,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TPE3 extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TPE4.php b/src/ID3/Frame/TPE4.php index db46f61..5432893 100644 --- a/src/ID3/Frame/TPE4.php +++ b/src/ID3/Frame/TPE4.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -44,9 +46,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TPE4 extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TPOS.php b/src/ID3/Frame/TPOS.php index 60c0d07..b917583 100644 --- a/src/ID3/Frame/TPOS.php +++ b/src/ID3/Frame/TPOS.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -46,9 +48,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TPOS extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TPRO.php b/src/ID3/Frame/TPRO.php index f727934..9a0b3ef 100644 --- a/src/ID3/Frame/TPRO.php +++ b/src/ID3/Frame/TPRO.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +30,10 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ + * @since ID3v2.4.0 */ /**#@+ @ignore */ @@ -49,9 +52,10 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ + * @since ID3v2.4.0 */ final class ID3_Frame_TPRO extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TPUB.php b/src/ID3/Frame/TPUB.php index 782a672..99bfe26 100644 --- a/src/ID3/Frame/TPUB.php +++ b/src/ID3/Frame/TPUB.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TPUB extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TRCK.php b/src/ID3/Frame/TRCK.php index bed052a..e5079ef 100644 --- a/src/ID3/Frame/TRCK.php +++ b/src/ID3/Frame/TRCK.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -45,9 +47,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TRCK extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TRSN.php b/src/ID3/Frame/TRSN.php index 52b7b35..774f225 100644 --- a/src/ID3/Frame/TRSN.php +++ b/src/ID3/Frame/TRSN.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TRSN extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TRSO.php b/src/ID3/Frame/TRSO.php index 41ecabb..a60e8ae 100644 --- a/src/ID3/Frame/TRSO.php +++ b/src/ID3/Frame/TRSO.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TRSO extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TSOA.php b/src/ID3/Frame/TSOA.php index 9714ec8..c2472d4 100644 --- a/src/ID3/Frame/TSOA.php +++ b/src/ID3/Frame/TSOA.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +30,10 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ + * @since ID3v2.4.0 */ /**#@+ @ignore */ @@ -40,12 +43,13 @@ require_once("AbstractText.php"); /** * The Album sort order frame defines a string which should be used * instead of the {@link ID3_Frame_TALB} album name frame for sorting purposes. -* + * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ + * @since ID3v2.4.0 */ final class ID3_Frame_TSOA extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TSOP.php b/src/ID3/Frame/TSOP.php index 3f61b44..9a24310 100644 --- a/src/ID3/Frame/TSOP.php +++ b/src/ID3/Frame/TSOP.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +30,10 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ + * @since ID3v2.4.0 */ /**#@+ @ignore */ @@ -43,9 +46,10 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ + * @since ID3v2.4.0 */ final class ID3_Frame_TSOP extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TSOT.php b/src/ID3/Frame/TSOT.php index edacb59..c435ef9 100644 --- a/src/ID3/Frame/TSOT.php +++ b/src/ID3/Frame/TSOT.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +30,10 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ + * @since ID3v2.4.0 */ /**#@+ @ignore */ @@ -43,9 +46,10 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ + * @since ID3v2.4.0 */ final class ID3_Frame_TSOT extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TSRC.php b/src/ID3/Frame/TSRC.php index dbbb74d..48c9f36 100644 --- a/src/ID3/Frame/TSRC.php +++ b/src/ID3/Frame/TSRC.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_ISRC extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TSSE.php b/src/ID3/Frame/TSSE.php index ca60444..568118f 100644 --- a/src/ID3/Frame/TSSE.php +++ b/src/ID3/Frame/TSSE.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -44,9 +46,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TSSE extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TSST.php b/src/ID3/Frame/TSST.php index 96027c6..083242f 100644 --- a/src/ID3/Frame/TSST.php +++ b/src/ID3/Frame/TSST.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,9 +30,10 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ + * @since ID3v2.4.0 */ /**#@+ @ignore */ @@ -43,9 +46,10 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ + * @since ID3v2.4.0 */ final class ID3_Frame_TSST extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/TXXX.php b/src/ID3/Frame/TXXX.php index 68b55ee..e107e74 100644 --- a/src/ID3/Frame/TXXX.php +++ b/src/ID3/Frame/TXXX.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -49,9 +51,9 @@ require_once("AbstractText.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_TXXX extends ID3_Frame_AbstractText {} diff --git a/src/ID3/Frame/USER.php b/src/ID3/Frame/USER.php index 16fb969..3e8160c 100644 --- a/src/ID3/Frame/USER.php +++ b/src/ID3/Frame/USER.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -48,9 +50,9 @@ require_once("ID3/Language.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_USER extends ID3_Frame @@ -80,17 +82,13 @@ final class ID3_Frame_USER extends ID3_Frame switch ($this->_encoding) { case self::UTF16: - $bom = substr($this->_data, 0, 2); - $this->_data = substr($this->_data, 2); - if ($bom == 0xfffe) { - $this->_text = Transform::getString16LE($this->_data); - break; - } + $this->_text = Transform::fromString16($this->_data); + break; case self::UTF16BE: - $this->_text = Transform::getString16BE($this->_data); + $this->_text = Transform::fromString16BE($this->_data); break; default: - $this->_text = Transform::getString8($this->_data); + $this->_text = Transform::fromString8($this->_data); } } diff --git a/src/ID3/Frame/USLT.php b/src/ID3/Frame/USLT.php index f115c26..83d0b2b 100644 --- a/src/ID3/Frame/USLT.php +++ b/src/ID3/Frame/USLT.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -47,9 +49,9 @@ require_once("ID3/Language.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_USLT extends ID3_Frame @@ -82,26 +84,22 @@ final class ID3_Frame_USLT extends ID3_Frame switch ($this->_encoding) { case self::UTF16: - $bom = substr($this->_data, 0, 2); - $this->_data = substr($this->_data, 2); - if ($bom == 0xfffe) { - list ($this->_description, $this->_text) = - preg_split("/\\x00\\x00/", $this->_data, 2); - $this->_description = Transform::getString16LE($this->_description); - $this->_text = Transform::getString16LE($this->_text); - break; - } + list ($this->_description, $this->_text) = + preg_split("/\\x00\\x00/", $this->_data, 2); + $this->_description = Transform::fromString16($this->_description); + $this->_text = Transform::fromString16($this->_text); + break; case self::UTF16BE: list ($this->_description, $this->_text) = preg_split("/\\x00\\x00/", $this->_data, 2); - $this->_description = Transform::getString16BE($this->_description); - $this->_text = Transform::getString16BE($this->_text); + $this->_description = Transform::fromString16BE($this->_description); + $this->_text = Transform::fromString16BE($this->_text); break; default: list ($this->_description, $this->_text) = preg_split("/\\x00/", $this->_data, 2); - $this->_description = Transform::getString8($this->_description); - $this->_text = Transform::getString8($this->_text); + $this->_description = Transform::fromString8($this->_description); + $this->_text = Transform::fromString8($this->_text); } } diff --git a/src/ID3/Frame/WCOM.php b/src/ID3/Frame/WCOM.php index 0c494c6..9ba0880 100644 --- a/src/ID3/Frame/WCOM.php +++ b/src/ID3/Frame/WCOM.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -44,9 +46,9 @@ require_once("AbstractLink.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_WCOM extends ID3_Frame_AbstractLink {} diff --git a/src/ID3/Frame/WCOP.php b/src/ID3/Frame/WCOP.php index 4eb9da1..16bb817 100644 --- a/src/ID3/Frame/WCOP.php +++ b/src/ID3/Frame/WCOP.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("AbstractLink.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_WCOP extends ID3_Frame_AbstractLink {} diff --git a/src/ID3/Frame/WOAF.php b/src/ID3/Frame/WOAF.php index c78941d..f888847 100644 --- a/src/ID3/Frame/WOAF.php +++ b/src/ID3/Frame/WOAF.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("AbstractLink.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_WOAF extends ID3_Frame_AbstractLink {} diff --git a/src/ID3/Frame/WOAR.php b/src/ID3/Frame/WOAR.php index c6e9a1b..0631679 100644 --- a/src/ID3/Frame/WOAR.php +++ b/src/ID3/Frame/WOAR.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -44,9 +46,9 @@ require_once("AbstractLink.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_WOAR extends ID3_Frame_AbstractLink {} diff --git a/src/ID3/Frame/WOAS.php b/src/ID3/Frame/WOAS.php index ddc7f96..d8ef494 100644 --- a/src/ID3/Frame/WOAS.php +++ b/src/ID3/Frame/WOAS.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("AbstractLink.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_WOAS extends ID3_Frame_AbstractLink {} diff --git a/src/ID3/Frame/WORS.php b/src/ID3/Frame/WORS.php index e92e719..9d95419 100644 --- a/src/ID3/Frame/WORS.php +++ b/src/ID3/Frame/WORS.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("AbstractLink.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_WORS extends ID3_Frame_AbstractLink {} diff --git a/src/ID3/Frame/WPAY.php b/src/ID3/Frame/WPAY.php index bfb52de..69cbd4a 100644 --- a/src/ID3/Frame/WPAY.php +++ b/src/ID3/Frame/WPAY.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("AbstractLink.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_WPAY extends ID3_Frame_AbstractLink {} diff --git a/src/ID3/Frame/WPUB.php b/src/ID3/Frame/WPUB.php index 5cc05ad..d7ef149 100644 --- a/src/ID3/Frame/WPUB.php +++ b/src/ID3/Frame/WPUB.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -43,9 +45,9 @@ require_once("AbstractLink.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_WPUB extends ID3_Frame_AbstractLink {} diff --git a/src/ID3/Frame/WXXX.php b/src/ID3/Frame/WXXX.php index 292c0e3..4038ec3 100644 --- a/src/ID3/Frame/WXXX.php +++ b/src/ID3/Frame/WXXX.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -47,9 +49,9 @@ require_once("ID3/Encoding.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Frame_WXXX extends ID3_Frame_AbstractLink @@ -75,18 +77,14 @@ final class ID3_Frame_WXXX extends ID3_Frame_AbstractLink switch ($this->_encoding) { case self::UTF16: - $bom = substr($this->_data, 0, 2); - $this->_data = substr($this->_data, 2); - if ($bom == 0xfffe) { - list($this->_description, $this->_link) = - preg_split("/\\x00\\x00/", $this->_data, 2); - $this->_description = Transform::getString16LE($this->_description); - break; - } + list($this->_description, $this->_link) = + preg_split("/\\x00\\x00/", $this->_data, 2); + $this->_description = Transform::fromString16($this->_description); + break; case self::UTF16BE: list($this->_description, $this->_link) = preg_split("/\\x00\\x00/", $this->_data, 2); - $this->_description = Transform::getString16BE($this->_description); + $this->_description = Transform::fromString16BE($this->_description); break; case self::UTF8: case self::ISO88591: diff --git a/src/ID3/Header.php b/src/ID3/Header.php index fcad4ab..8c3f75a 100644 --- a/src/ID3/Header.php +++ b/src/ID3/Header.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -47,9 +49,9 @@ require_once("Object.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3_Header extends ID3_Object @@ -91,10 +93,10 @@ final class ID3_Header extends ID3_Object { parent::__construct($reader); - $this->_version = ord($this->_reader->getInt8()); - $this->_revision = ord($this->_reader->getInt8()); - $this->_flags = $this->_reader->getInt8(); - $this->_size = $this->decodeSynchsafe32($this->_reader->getUInt32BE()); + $this->_version = $this->_reader->readInt8(); + $this->_revision = $this->_reader->readInt8(); + $this->_flags = $this->_reader->readInt8(); + $this->_size = $this->decodeSynchsafe32($this->_reader->readUInt32BE()); } /** diff --git a/src/ID3/Language.php b/src/ID3/Language.php index 8d2e2eb..785496f 100644 --- a/src/ID3/Language.php +++ b/src/ID3/Language.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -44,9 +46,9 @@ * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ interface ID3_Language diff --git a/src/ID3/Object.php b/src/ID3/Object.php index 8b14761..ac7a0be 100644 --- a/src/ID3/Object.php +++ b/src/ID3/Object.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -38,9 +40,9 @@ * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ abstract class ID3_Object @@ -52,17 +54,52 @@ abstract class ID3_Object */ protected $_reader; + /** + * The options array. + * + * @var Array + */ + protected $_options = array(); + /** * Constructs the class with given parameters and reads object related data * from the ID3v2 tag. * * @param Reader $reader The reader object. */ - public function __construct($reader) + public function __construct($reader = null) { $this->_reader = $reader; } + /** + * Magic function so that $obj->value will work. + * + * @param string $name The field name. + * @return mixed + */ + public function __get($name) + { + if (method_exists($this, "get" . ucfirst($name))) + return call_user_func(array($this, "get" . ucfirst($name))); + else throw new Reader_Exception("Unknown field: " . $name); + } + + /** + * Magic function so that assignments with $obj->value will work. + * + * @param string $name The field name. + * @param string $value The field value. + * @return mixed + */ + public function __set($name, $value) + { + if (method_exists($this, "set" . ucfirst($name))) + call_user_func + (array($this, "set" . ucfirst($name)), $value); + else throw new Reader_Exception("Unknown field: " . $name); + } + /** * Encodes the given 32-bit integer to 28-bit synchsafe integer, where the * most significant bit of each byte is zero, making seven bits out of eight @@ -71,7 +108,8 @@ abstract class ID3_Object * @param integer $val The integer to encode. * @return integer */ - protected function encodeSynchsafe32($val) { + protected function encodeSynchsafe32($val) + { for ($i = 0, $mask = 0xffffff00; $i < 4; $i++, $mask <<= 8) $val = ($val << 1 & $mask) | ($val << 1 & ~$mask) >> 1; return $val & 0x7fffffff; @@ -83,7 +121,8 @@ abstract class ID3_Object * @param integer $val The integer to decode * @return integer */ - protected function decodeSynchsafe32($val) { + protected function decodeSynchsafe32($val) + { for ($i = 0, $mask = 0xff000000; $i < 3; $i++, $mask >>= 8) $val = ($val & $mask) >> 1 | ($val & ~$mask); return $val; diff --git a/src/ID3/Timing.php b/src/ID3/Timing.php index 176ed6d..bbcccd0 100644 --- a/src/ID3/Timing.php +++ b/src/ID3/Timing.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,8 +30,8 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -42,9 +44,9 @@ * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ interface ID3_Timing diff --git a/src/ID3v1.php b/src/ID3v1.php index 3d7d432..29a7b45 100644 --- a/src/ID3v1.php +++ b/src/ID3v1.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -28,13 +30,14 @@ * * @package php-reader * @subpackage ID3 - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ /**#@+ @ignore */ require_once("Reader.php"); +require_once("ID3/Exception.php"); /**#@-*/ /** @@ -43,9 +46,9 @@ require_once("Reader.php"); * * @package php-reader * @subpackage ID3 - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3v1 @@ -69,7 +72,7 @@ final class ID3v1 private $_track; /** @var integer */ - private $_genre = 128; + private $_genre = 255; /** * The genre list. @@ -86,7 +89,7 @@ final class ID3v1 "AlternRock", "Bass", "Soul", "Punk", "Space", "Meditative", "Instrumental Pop", "Instrumental Rock", "Ethnic", "Gothic", "Darkwave", "Techno-Industrial", "Electronic", "Pop-Folk", "Eurodance", "Dream", - "Southern Rock", "Comedy", "Cult", "Gangsta", "Top ", "Christian Rap", + "Southern Rock", "Comedy", "Cult", "Gangsta", "Top 40", "Christian Rap", "Pop/Funk", "Jungle", "Native American", "Cabaret", "New Wave", "Psychadelic", "Rave", "Showtunes", "Trailer", "Lo-Fi", "Tribal", "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical", "Rock & Roll", @@ -98,38 +101,51 @@ final class ID3v1 "Booty Bass", "Primus", "Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba", "Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle", "Duet", "Punk Rock", "Drum Solo", "A capella", "Euro-House", - "Dance Hall", "Unknown"); + "Dance Hall", 255 => "Unknown"); /** @var Reader */ private $_reader; + /** @var string */ + private $_filename; + /** - * Constructs the ID3v1 class with given file. + * Constructs the ID3v1 class with given file. The file is not mandatory + * argument and may be omitted. A new tag can be written to a file also by + * giving the filename to the {@link #write} method of this class. * * @param string $filename The path to the file. */ - public function __construct($filename) + public function __construct($filename = false) { - $this->_reader = new Reader($filename); - $this->_reader->setOffset(-128); - if ($this->_reader->getString8(3) != "TAG") - throw new ID3_Exception("File does not contain ID3v1 tag: " . $filename); + if (($this->_filename = $filename) === false || + file_exists($filename) === false) + return; - $this->_title = rtrim($this->_reader->getString8(30), " \0"); - $this->_artist = rtrim($this->_reader->getString8(30), " \0"); - $this->_album = rtrim($this->_reader->getString8(30), " \0"); - $this->_year = $this->_reader->getString8(4); - $this->_comment = rtrim($this->_reader->getString8(28), " \0"); + $this->_reader = new Reader($filename); + if ($this->_reader->size < 128) + return; + $this->_reader->offset = -128; + if ($this->_reader->read(3) != "TAG") { + $this->_reader = false; // reset reader, see write + return; + } + + $this->_title = rtrim($this->_reader->readString8(30), " \0"); + $this->_artist = rtrim($this->_reader->readString8(30), " \0"); + $this->_album = rtrim($this->_reader->readString8(30), " \0"); + $this->_year = $this->_reader->readString8(4); + $this->_comment = rtrim($this->_reader->readString8(28), " \0"); /* ID3v1.1 support for tracks */ - $v11_null = $this->_reader->getInt8(); - $v11_track = $this->_reader->getInt8(); + $v11_null = $this->_reader->read(1); + $v11_track = $this->_reader->read(1); if (ord($v11_null) == 0 && ord($v11_track) != 0) $this->_track = ord($v11_track); else $this->_comment = rtrim($this->_comment . $v11_null . $v11_track, " \0"); - $this->_genre = ord($this->_reader->getInt8()); + $this->_genre = $this->_reader->readInt8(); } /** @@ -139,6 +155,14 @@ final class ID3v1 */ public function getTitle() { return $this->_title; } + /** + * Sets a new value for the title field. The field cannot exceed 30 + * characters in length. + * + * @param string $title The title. + */ + public function setTitle($title) { $this->_title = $title; } + /** * Returns the artist field. * @@ -146,6 +170,14 @@ final class ID3v1 */ public function getArtist() { return $this->_artist; } + /** + * Sets a new value for the artist field. The field cannot exceed 30 + * characters in length. + * + * @param string $artist The artist. + */ + public function setArtist($artist) { $this->_artist = $artist; } + /** * Returns the album field. * @@ -153,6 +185,14 @@ final class ID3v1 */ public function getAlbum() { return $this->_album; } + /** + * Sets a new value for the album field. The field cannot exceed 30 + * characters in length. + * + * @param string $album The album. + */ + public function setAlbum($album) { $this->_album = $album; } + /** * Returns the year field. * @@ -160,6 +200,14 @@ final class ID3v1 */ public function getYear() { return $this->_year; } + /** + * Sets a new value for the year field. The field cannot exceed 4 + * characters in length. + * + * @param string $year The year. + */ + public function setYear($year) { $this->_year = $year; } + /** * Returns the comment field. * @@ -167,6 +215,14 @@ final class ID3v1 */ public function getComment() { return $this->_comment; } + /** + * Sets a new value for the comment field. The field cannot exceed 30 + * characters in length. + * + * @param string $comment The comment. + */ + public function setComment($comment) { $this->_comment = $comment; } + /** * Returns the track field. * @@ -175,16 +231,67 @@ final class ID3v1 */ public function getTrack() { return $this->_track; } + /** + * Sets a new value for the track field. By setting this field you enforce the + * 1.1 version to be used. + * + * @since ID3v1.1 + * @param integer $track The track number. + */ + public function setTrack($track) { $this->_track = $track; } + /** * Returns the genre. * * @return string */ - public function getGenre() { + public function getGenre() + { if (isset(self::$genres[$this->_genre])) return self::$genres[$this->_genre]; else - return self::$genres[128]; // unknown + return self::$genres[255]; // unknown + } + + /** + * Sets a new value for the genre field. The value may either be a numerical + * code representing one of the genres, or its string variant. + * + * The genre is set to unknown (code 255) in case the string is not found from + * the static {@link $genres} array of this class. + * + * @param integer $genre The genre. + */ + public function setGenre($genre) + { + if ((is_numeric($genre) && $genre >= 0 && $genre <= 255) || + ($genre = array_search($genre, self::$genres)) !== false) + $this->_genre = $genre; + else + $this->_genre = 255; // unknown + } + + /** + * Writes the possibly altered ID3v1 tag back to the file where it was read. + * If the class was constructed without a file name, one can be provided here + * as an argument. Regardless, the write operation will override previous + * tag information, if found. + * + * @param string $filename The optional path to the file. + */ + public function write($filename = false) + { + if ($filename === false && ($filename = $this->_filename) === false) + throw new ID3_Exception("No file given to write the tag to"); + + if (($fd = fopen + ($filename, file_exists($filename) ? "r+b" : "wb")) === false) + throw new ID3_Exception("Unable to open file for writing: " . $filename); + + fseek($fd, $this->_reader !== false ? -128 : 0, SEEK_END); + fwrite($fd, $this, 128); + + $this->_filename = $filename; } /** @@ -193,8 +300,44 @@ final class ID3v1 * @param string $name The field name. * @return mixed */ - public function __get($name) { + public function __get($name) + { if (method_exists($this, "get" . ucfirst(strtolower($name)))) return call_user_func(array($this, "get" . ucfirst(strtolower($name)))); + else throw new ID3_Exception("Unknown field: " . $name); + } + + /** + * Magic function so that assignments with $obj->value will work. + * + * @param string $name The field name. + * @param string $value The field value. + * @return mixed + */ + public function __set($name, $value) + { + if (method_exists($this, "set" . ucfirst(strtolower($name)))) + call_user_func + (array($this, "set" . ucfirst(strtolower($name))), $value); + else throw new ID3_Exception("Unknown field: " . $name); + } + + /** + * Returns the tag raw data. + * + * @return string + */ + private function __toString() + { + return "TAG" . + Transform::toString8(substr($this->_title, 0, 30), 30) . + Transform::toString8(substr($this->_artist, 0, 30), 30) . + Transform::toString8(substr($this->_album, 0, 30), 30) . + Transform::toString8(substr($this->_year, 0, 4), 4) . + ($this->_track ? + Transform::toString8(substr($this->_comment, 0, 28), 28) . + "\0" . Transform::toInt8($this->_track) : + Transform::toString8(substr($this->_comment, 0, 30), 30)) . + Transform::toInt8($this->_genre); } } diff --git a/src/ID3v2.php b/src/ID3v2.php index 2c8b588..7e89642 100644 --- a/src/ID3v2.php +++ b/src/ID3v2.php @@ -1,6 +1,8 @@ - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ final class ID3v2 @@ -99,19 +99,36 @@ final class ID3v2 private $_extendedHeader; /** @var ID3_Header */ - private $_footer; + private $_footer = null; + /** @var Array */ + private $_frames = array(); + + /** @var string */ + private $_filename; + /** - * Constructs the ID3v2 class with given file. + * Constructs the ID3v2 class with given file and options. * * @todo Only limited subset of flags are processed. + * @todo ID3_Footer * @param string $filename The path to the file. + * @param Array $options The options array. */ - public function __construct($filename) + public function __construct($filename = false, $options = array()) { + if (is_array($filename)) { + $options = $filename; + $filename = false; + } + + if (($this->_filename = $filename) === false || + file_exists($filename) === false) + return; + $this->_reader = new Reader($filename); - if ($this->_reader->getString8(3) != "ID3") + if ($this->_reader->readString8(3) != "ID3") throw new ID3_Exception("File does not contain ID3v2 tag: " . $filename); $this->_header = new ID3_Header($this->_reader); @@ -121,10 +138,16 @@ final class ID3v2 if ($this->_header->hasFlag(ID3_Header::EXTENDEDHEADER)) $this->_extendedHeader = new ID3_ExtendedHeader($this->_reader); if ($this->_header->hasFlag(ID3_Header::FOOTER)) { - $offset = $this->_reader->getOffset(); - $this->_reader->setOffset($this->_header->getSize() + 10); + $offset = $this->_reader->offset; + $this->_reader->offset = $this->_header->getSize() + 10; $this->_footer = new ID3_Header($this->_reader); - $this->_reader->setOffset($offset); + $this->_reader->offset = $offset; + } + + while ($frame = $this->nextFrame()) { + if (!isset($this->_frames[$frame->identifier])) + $this->_frames[$frame->identifier] = array(); + $this->_frames[$frame->identifier][] = $frame; } } @@ -158,16 +181,16 @@ final class ID3v2 return $this->_extendedHeader; return false; } - + /** * Checks whether there are frames left in the tag. Returns true if * there are frames left in the tag, false otherwise. * * @return boolean */ - public function hasFrames() + protected function hasFrames() { - $offset = $this->_reader->getOffset(); + $offset = $this->_reader->offset; // Return false if we reached the end of the tag if ($offset >= $this->_header->getSize() - 10 - @@ -175,8 +198,8 @@ final class ID3v2 return false; // Return false if we reached the last frame, true otherwise - $res = $this->_reader->getUInt32() != 0; - $this->_reader->setOffset($offset); + $res = $this->_reader->readUInt32BE() != 0; + $this->_reader->offset = $offset; return $res; } @@ -187,14 +210,13 @@ final class ID3v2 * * @return ID3_Frame|false */ - public function nextFrame() + protected function nextFrame() { $frame = false; if ($this->hasFrames()) { - $offset = $this->_reader->getOffset(); - $identifier = $this->_reader->getString8(4); - $this->_reader->setOffset($offset); - + $offset = $this->_reader->offset; + $identifier = $this->_reader->readString8(4); + $this->_reader->offset = $offset; if (file_exists($filename = "ID3/Frame/" . $identifier . ".php")) require_once($filename); if (class_exists($classname = "ID3_Frame_" . $identifier)) @@ -205,6 +227,55 @@ final class ID3v2 return $frame; } + /** + * Checks whether there is a frame given as an argument defined in the tag. + * Returns true if one ore more frames are present, + * false otherwise. + * + * @return boolean + */ + public function hasFrame($identifier) + { + return isset($this->_frames[$identifier]); + } + + /** + * Returns all the frames the tag contains as an associate array. The frame + * identifiers work as keys having an array of frames as associated value. + * + * @return Array + */ + public function getFrames() + { + return $this->_frames; + } + + /** + * Returns an array of frames matching the given identifier or an empty array + * if no frames matched the identifier. + * + * The identifier may contain wildcard characters "*" and "?". The asterisk + * matches against zero or more characters, and the question mark matches any + * single character. + * + * Please note that one may also use the shorthand $obj->identifier to access + * the first frame with the identifier given. Wildcards cannot be used with + * the shorthand. + * + * @return Array + */ + public function getFramesByIdentifier($identifier) + { + $matches = array(); + $searchPattern = "/^" . + str_replace(array("*", "?"), array(".*", "."), $identifier) . "$/i"; + foreach ($this->_frames as $identifier => $frames) + if (preg_match($searchPattern, $identifier)) + foreach ($frames as $frame) + $matches[] = $frame; + return $matches; + } + /** * Checks whether there is a footer present in the tag. Returns * true if the footer is present, false otherwise. @@ -227,4 +298,19 @@ final class ID3v2 return $this->_footer; return false; } + + /** + * Magic function so that $obj->value will work. The method will attempt to + * return the first frame that matches the identifier. + * + * @param string $name The frame or field name. + * @return mixed + */ + public function __get($name) { + if (isset($this->_frames[$name])) + return $this->_frames[$name][0]; + if (method_exists($this, "get" . ucfirst($name))) + return call_user_func(array($this, "get" . ucfirst($name))); + else throw new ID3_Exception("Unknown frame/field: " . $name); + } } diff --git a/src/Reader.php b/src/Reader.php index 1e6ede6..70e277b 100644 --- a/src/Reader.php +++ b/src/Reader.php @@ -1,6 +1,9 @@ - * @copyright Copyright (c) 2006, 2007 The Bearpaw Project Work Group - * @copyright Copyright (c) 2007, 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @author Sven Vollbehr + * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Rev$ */ class Reader @@ -62,11 +63,12 @@ class Reader * Constructs the Reader class with given file. * * @param string $filename The path to the file. + * @param string $mode The type of access. * @throws Reader_Exception if the file cannot be read. */ - public function __construct($filename) + public function __construct($filename, $mode = "rb") { - if (($this->_fd = fopen($filename, "rb")) === false) + if (($this->_fd = fopen($filename, $mode)) === false) throw new Reader_Exception("Unable to open file:" . $filename); fseek($this->_fd, 0, SEEK_END); @@ -158,7 +160,33 @@ class Reader { return $this->_size; } - + + /** + * Magic function so that $obj->value will work. + * + * @param string $name The field name. + * @return mixed + */ + public function __get($name) { + if (method_exists($this, "get" . ucfirst(strtolower($name)))) + return call_user_func(array($this, "get" . ucfirst(strtolower($name)))); + else throw new Reader_Exception("Unknown field: " . $name); + } + + /** + * Magic function so that assignments with $obj->value will work. + * + * @param string $name The field name. + * @param string $value The field value. + * @return mixed + */ + public function __set($name, $value) { + if (method_exists($this, "set" . ucfirst(strtolower($name)))) + call_user_func + (array($this, "set" . ucfirst(strtolower($name))), $value); + else throw new Reader_Exception("Unknown field: " . $name); + } + /** * Magic function to delegate the call to helper methods of * Transform class to transform read data in another format. @@ -175,10 +203,10 @@ class Reader public function __call($method, $params) { $chunks = array(); if (preg_match - ("/get([a-z]{3,6})?(\d{1,2})?(?:LE|BE)?/i", $method, $chunks) && - method_exists("Transform", $method)) { + ("/read([a-z]{3,6})?(\d{1,2})?(?:LE|BE)?/i", $method, $chunks) && + method_exists("Transform", preg_replace("/^read/", "from", $method))) { return call_user_func - (array("Transform", $method), + (array("Transform", preg_replace("/^read/", "from", $method)), $this->read(preg_match("/String|(?:H|L)Hex/", $chunks[1]) ? (isset($params[0]) ? $params[0] : 1) : ($chunks[1] == "GUID" ? 16 : $chunks[2] / 8))); diff --git a/src/Reader/Exception.php b/src/Reader/Exception.php index 3039227..18be17d 100644 --- a/src/Reader/Exception.php +++ b/src/Reader/Exception.php @@ -2,6 +2,8 @@ /** * PHP Reader Library * + * Copyright (c) 2008 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: * @@ -10,7 +12,7 @@ * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - Neither the name of the BEHR Software Systems nor the names of its + * - Neither the name of the project workgroup nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * @@ -27,8 +29,8 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package php-reader - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Id$ */ @@ -37,9 +39,9 @@ * class during a file operation. * * @package php-reader - * @author Sven Vollbehr - * @copyright Copyright (c) 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @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$ */ class Reader_Exception extends Exception diff --git a/src/Transform.php b/src/Transform.php index ec5ec9b..ed410cb 100644 --- a/src/Transform.php +++ b/src/Transform.php @@ -1,6 +1,9 @@ - * @copyright Copyright (c) 2006, 2007 The Bearpaw Project Work Group - * @copyright Copyright (c) 2007, 2008 BEHR Software Systems - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License + * @author Sven Vollbehr + * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Rev$ * @static */ @@ -56,243 +57,409 @@ final class Transform private function __construct() {} /** - * Returns machine-endian ordered binary data as 64-bit float. PHP does not - * support 64-bit integers as the long integer is of 32-bits but using - * aritmetic operations it is implicitly converted into floating point which - * is of 64-bits long. + * Returns 64-bit float as little-endian ordered binary data string. * - * @param string $raw The raw data string. - * @param integer $order The byte order of the raw string. - * @return integer + * @param integer $value The input value. + * @return string */ - public static function getInt64($raw, $order = self::MACHINE_ENDIAN_ORDER) + public static function toInt64LE($value) { - list(, $lo, $hi) = unpack(($order == 2 ? "L" : - ($order == 1 ? "V" : "N")) . "*", $raw); - return $hi * 0xffffffff + $lo; + return pack("V*", $value & 0xffffffff, $value / (0xffffffff+1)); } - + /** * Returns little-endian ordered binary data as 64-bit float. PHP does not * support 64-bit integers as the long integer is of 32-bits but using * aritmetic operations it is implicitly converted into floating point which * is of 64-bits long. * - * @param string $raw The raw data string. + * @param string $value The binary data string. * @return integer */ - public static function getInt64LE($raw) + public static function fromInt64LE($value) { - return self::getInt64($raw, self::LITTLE_ENDIAN_ORDER); + list(, $lolo, $lohi, $hilo, $hihi) = unpack("v*", $value); + return ($hihi * (0xffff+1) + $hilo) * (0xffffffff+1) + + ($lohi * (0xffff+1) + $lolo); } - + + /** + * Returns 64-bit float as big-endian ordered binary data string. + * + * @param integer $value The input value. + * @return string + */ + public static function toInt64BE($value) + { + return pack("N*", $value / (0xffffffff+1), $value & 0xffffffff); + } + /** * Returns big-endian ordered binary data as 64-bit float. PHP does not * support 64-bit integers as the long integer is of 32-bits but using * aritmetic operations it is implicitly converted into floating point which * is of 64-bits long. * - * @param string $raw The raw data string. + * @param string $value The binary data string. * @return integer */ - public static function getInt64BE($raw) + public static function fromInt64BE($value) { - return self::getInt64($raw, self::BIG_ENDIAN_ORDER); + list(, $hihi, $hilo, $lohi, $lolo) = unpack("n*", $value); + return ($hihi * (0xffff+1) + $hilo) * (0xffffffff+1) + + ($lohi * (0xffff+1) + $lolo); } - + + /** + * Returns signed 32-bit integer as machine-endian ordered binary data. + * + * @param integer $value The input value. + * @return string + */ + public static function toInt32($value) + { + return pack("l*", $value); + } + /** * Returns machine-endian ordered binary data as signed 32-bit integer. - * - * @param string $raw The raw data string. + * + * @param string $value The binary data string. * @return integer */ - public static function getInt32($raw) + public static function fromInt32($value) { - list(, $int) = unpack("l*", $raw); + list(, $int) = unpack("l*", $value); return $int; } - + /** - * Returns machine-endian ordered binary data as unsigned 32-bit integer. + * Returns unsigned 32-bit integer as little-endian ordered binary data. * - * @param string $raw The raw data string. - * @param integer $order The byte order of the raw string. - * @return integer + * @param integer $value The input value. + * @return string */ - public static function getUInt32($raw, $order = self::MACHINE_ENDIAN_ORDER) + public static function toUInt32LE($value) { - list(, $int) = unpack(($order == 2 ? "N" : - ($order == 1 ? "V" : "L")) . "*", $raw); - return $int; + return pack("V*", $value); } - + /** * Returns little-endian ordered binary data as unsigned 32-bit integer. * - * @param string $raw The raw data string. + * @param string $value The binary data string. * @return integer */ - public static function getUInt32LE($raw) + public static function fromUInt32LE($value) { - return self::getUInt32($raw, self::LITTLE_ENDIAN_ORDER); + list(, $lo, $hi) = unpack("v*", $value); + return $hi * (0xffff+1) + $lo; // eq $hi << 16 | $lo } - + + /** + * Returns unsigned 32-bit integer as big-endian ordered binary data. + * + * @param integer $value The input value. + * @return string + */ + public static function toUInt32BE($value) + { + return pack("N*", $value); + } + /** * Returns big-endian ordered binary data as unsigned 32-bit integer. * - * @param string $raw The raw data string. + * @param string $value The binary data string. * @return integer */ - public static function getUInt32BE($raw) + public static function fromUInt32BE($value) { - return self::getUInt32($raw, self::BIG_ENDIAN_ORDER); + list(, $hi, $lo) = unpack("n*", $value); + return $hi * (0xffff+1) + $lo; // eq $hi << 16 | $lo } - + + /** + * Returns signed 16-bit integer as machine endian ordered binary data. + * + * @param integer $value The input value. + * @return string + */ + public static function toInt16($value) + { + return pack("s*", $value); + } + /** * Returns machine endian ordered binary data as signed 16-bit integer. * - * @param string $raw The raw data string. + * @param string $value The binary data string. * @return integer */ - public static function getInt16($raw) + public static function fromInt16($value) { - list(, $int) = unpack("s*", $raw); + list(, $int) = unpack("s*", $value); return $int; } - + /** * Returns machine endian ordered binary data as unsigned 16-bit integer. * - * @param string $raw The raw data string. - * @param integer $order The byte order of the raw string. + * @param string $value The binary data string. + * @param integer $order The byte order of the binary data string. * @return integer */ - public static function getUInt16($raw, $order) + private static function fromUInt16($value, $order = self::MACHINE_ENDIAN_ORDER) { list(, $int) = unpack(($order == 2 ? "n" : - ($order == 1 ? "v" : "S")) . "*", $raw); + ($order == 1 ? "v" : "S")) . "*", $value); return $int; } - + + /** + * Returns unsigned 16-bit integer as little-endian ordered binary data. + * + * @param integer $value The input value. + * @return string + */ + public static function toUInt16LE($value) + { + return pack("v*", $value); + } + /** * Returns little-endian ordered binary data as unsigned 16-bit integer. * - * @param string $raw The raw data string. + * @param string $value The binary data string. * @return integer */ - public static function getUInt16LE($raw) + public static function fromUInt16LE($value) { - return self::getUInt16($raw, self::LITTLE_ENDIAN_ORDER); + return self::fromUInt16($value, self::LITTLE_ENDIAN_ORDER); } - + + /** + * Returns unsigned 16-bit integer as big-endian ordered binary data. + * + * @param integer $value The input value. + * @return string + */ + public static function toUInt16BE($value) + { + return pack("n*", $value); + } + /** * Returns big-endian ordered binary data as unsigned 16-bit integer. * - * @param string $raw The raw data string. + * @param string $value The binary data string. * @return integer */ - public static function getUInt16BE($raw) + public static function fromUInt16BE($value) { - return self::getUInt16($raw, self::BIG_ENDIAN_ORDER); + return self::fromUInt16($value, self::BIG_ENDIAN_ORDER); } - + /** * Returns binary data as 8-bit integer. * - * @param string $raw The raw data string. + * @param integer $value The input value. * @return integer */ - public static function getInt8($raw) + public static function toInt8($value) { - return $raw; + return chr($value); + } + + /** + * Returns binary data as 8-bit integer. + * + * @param string $value The binary data string. + * @return integer + */ + public static function fromInt8($value) + { + return ord($value); + } + + /** + * Returns string as binary data padded to given length with zeros. + * + * @param string $value The input value. + * @return string + */ + public static function toString8($value, $length, $padding = "\0") + { + return str_pad($value, $length, $padding); } /** * Returns binary data as string. Removes terminating zero. * - * @param string $raw The raw data string. + * @param string $value The binary data string. * @return string */ - public static function getString8($raw) + public static function fromString8($value) { - $string = ""; - foreach (unpack("C*", $raw) as $char) - $string .= pack("c", $char); - return rtrim($string, "\0"); + return rtrim($value, "\0"); } - + /** - * Returns machine-endian ordered binary data as multibyte string. + * Returns machine-ordered multibyte string as machine-endian ordered binary + * data * - * @param string $raw The raw data string. - * @param integer $order The byte order of the raw string. + * @param string $value The input value. + * @param integer $order The byte order of the binary data string. * @return string */ - public static function getString16($raw, $order = self::MACHINE_ENDIAN_ORDER) + public static function toString16($value, $order = self::MACHINE_ENDIAN_ORDER) { $string = ""; - foreach (unpack(($order == 2 ? "n" : - ($order == 1 ? "v" : "S")) . "*", $raw) as $char) - $string .= pack("S", $char); + foreach (unpack("S*", $value) as $char) + $string .= + pack(($order == 2 ? "n" : ($order == 1 ? "v" : "S")), $char); return $string; } /** - * Returns little-endian ordered binary data as multibyte string. + * Returns UTF-16 formatted binary data as machine-ordered multibyte string. + * The byte order is determined from the byte order mark included in the + * binary data string. * - * @param string $raw The raw data string. + * @param string $value The binary data string. * @return string */ - public static function getString16LE($raw) + public static function fromString16($value) { - return self::getString16($raw, self::LITTLE_ENDIAN_ORDER); + if ($value{0} == 0xfe && $value{1} = 0xff) + return self::fromString16LE(substr($value, 2)); + else + return self::fromString16BE(substr($value, 2)); } - + /** - * Returns big-endian ordered binary data as multibyte string. + * Returns machine-ordered multibyte string as little-endian ordered binary + * data. * - * @param string $raw The raw data string. + * @param string $value The input value. * @return string */ - public static function getString16BE($raw) + public static function toString16LE($value) { - return self::getString16($raw, self::BIG_ENDIAN_ORDER); + return self::toString16($value, self::LITTLE_ENDIAN_ORDER); } - + + /** + * Returns little-endian ordered binary data as machine ordered multibyte + * string. + * + * @param string $value The binary data string. + * @return string + */ + public static function fromString16LE($value) + { + $string = ""; + foreach (unpack("v*", $value) as $char) + $string .= pack("S", $char); + return $string; + } + + /** + * Returns machine ordered multibyte string as big-endian ordered binary data. + * + * @param string $value The input value. + * @return string + */ + public static function toString16BE($value) + { + return self::toString16($value, self::BIG_ENDIAN_ORDER); + } + + /** + * Returns big-endian ordered binary data as machine ordered multibyte string. + * + * @param string $value The binary data string. + * @return string + */ + public static function fromString16BE($value) + { + $string = ""; + foreach (unpack("n*", $value) as $char) + $string .= pack("S", $char); + return $string; + } + + /** + * Returns hexadecimal string having high nibble first as binary data. + * + * @param string $value The input value. + * @return string + */ + public static function toHHex($value) + { + return pack("H*", $value); + } + /** * Returns binary data as hexadecimal string having high nibble first. * - * @param string $raw The raw data string. + * @param string $value The binary data string. * @return string */ - public static function getHHex($raw) + public static function fromHHex($value) { - list($hex) = unpack("H*0", $raw); + list($hex) = unpack("H*0", $value); return $hex; } - + + /** + * Returns hexadecimal string having low nibble first as binary data. + * + * @param string $value The input value. + * @return string + */ + public static function toLHex($value) + { + return pack("h*", $value); + } + /** * Returns binary data as hexadecimal string having low nibble first. * - * @param string $raw The raw data string. + * @param string $value The binary data string. * @return string */ - public static function getLHex($raw) + public static function fromLHex($value) { - list($hex) = unpack("h*0", $raw); + list($hex) = unpack("h*0", $value); return $hex; } - + /** - * Returns the little-endian ordered raw data as big-endian ordered - * hexadecimal GUID string. + * Returns big-endian ordered hexadecimal GUID string as little-endian ordered + * binary data string. * - * @param string $raw The raw data string. + * @param string $value The input value. * @return string */ - public static function getGUID($raw) + public static function toGUID($value) { - $C = @unpack("V1V/v2v/N2N", $raw); + $string = ""; $C = preg_split("/-/", $value); + return pack + ("V1v2N2", hexdec($C[0]), hexdec($C[1]), hexdec($C[2]), + hexdec($C[3] . substr($C[4], 0, 4)), hexdec(substr($C[4], 4))); + } + + /** + * Returns the little-endian ordered binary data as big-endian ordered + * hexadecimal GUID string. + * + * @param string $value The binary data string. + * @return string + */ + public static function fromGUID($value) + { + $C = @unpack("V1V/v2v/N2N", $value); list($hex) = @unpack("H*0", pack ("NnnNN", $C["V"], $C["v1"], $C["v2"], $C["N1"], $C["N2"])); diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 index 0000000..594a027 --- /dev/null +++ b/tests/Makefile @@ -0,0 +1,44 @@ +# +# PHP Reader Library +# +# Copyright (c) 2008 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: +# +# - Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# - Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# - Neither the name of the project workgroup nor the names of its +# contributors may be used to endorse or promote products derived from this +# software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +# $Id$ +# + +CLEANFILES = *~ +ax_prog_tput = `which tput 2>/dev/null` + +all: + @if test -n "${ax_prog_tput}"; then \ + ${ax_prog_tput} bold 2>/dev/null; \ + fi; + @echo -e "\nMaking tests ...\n"; + @if test -n "${ax_prog_tput}"; then \ + ${ax_prog_tput} sgr0 2>/dev/null; \ + fi; + @php -f TestAll.php diff --git a/tests/TestAll.php b/tests/TestAll.php new file mode 100644 index 0000000..0275732 --- /dev/null +++ b/tests/TestAll.php @@ -0,0 +1,57 @@ +addTestSuite(substr($file, 0, -4)); + } +} +closedir($dir); + +PHPUnit_TextUI_TestRunner::run($suite); +/**#@-*/ diff --git a/tests/TestID3v1.php b/tests/TestID3v1.php new file mode 100644 index 0000000..1f7c7de --- /dev/null +++ b/tests/TestID3v1.php @@ -0,0 +1,194 @@ + + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License + * @version $Rev$ + */ +final class TestID3v1 extends PHPUnit_Framework_TestCase +{ + function testTagCreate() + { + $id3 = new ID3v1(); + + $id3->title = "Title 1"; + $this->assertEquals("Title 1", $id3->title); + + $id3->artist = "Artist 1"; + $this->assertEquals("Artist 1", $id3->artist); + + $id3->album = "Album 1"; + $this->assertEquals("Album 1", $id3->album); + + $id3->year = "2008"; + $this->assertEquals("2008", $id3->year); + + $id3->comment = "Comment 1"; + $this->assertEquals("Comment 1", $id3->comment); + + $id3->track = 30; + $this->assertEquals(30, $id3->track); + + $id3->genre = array_search("Classical", ID3v1::$genres); + $this->assertEquals("Classical", $id3->genre); + + $id3->write("id3v1.tag"); + } + + function testTagReadAfterCreate() + { + $id3 = new ID3v1("id3v1.tag"); + $this->assertEquals("Title 1", $id3->title); + $this->assertEquals("Artist 1", $id3->artist); + $this->assertEquals("Album 1", $id3->album); + $this->assertEquals("2008", $id3->year); + $this->assertEquals("Comment 1", $id3->comment); + $this->assertEquals(30, $id3->track); + $this->assertEquals("Classical", $id3->genre); + } + + function testTagChange() + { + $id3 = new ID3v1("id3v1.tag"); + + $id3->title = "Title 2"; + $this->assertEquals("Title 2", $id3->title); + + $id3->artist = "Artist 2"; + $this->assertEquals("Artist 2", $id3->artist); + + $id3->album = "Album 2"; + $this->assertEquals("Album 2", $id3->album); + + $id3->year = "2045"; + $this->assertEquals("2045", $id3->year); + + $id3->comment = "Comment 2"; + $this->assertEquals("Comment 2", $id3->comment); + + $id3->track = 10; + $this->assertEquals(10, $id3->track); + + $id3->genre = array_search("Trance", ID3v1::$genres); + $this->assertEquals("Trance", $id3->genre); + + $id3->write(); + } + + function testTagReadAfterChange() + { + $id3 = new ID3v1("id3v1.tag"); + $this->assertEquals("Title 2", $id3->title); + $this->assertEquals("Artist 2", $id3->artist); + $this->assertEquals("Album 2", $id3->album); + $this->assertEquals("2045", $id3->year); + $this->assertEquals("Comment 2", $id3->comment); + $this->assertEquals(10, $id3->track); + $this->assertEquals("Trance", $id3->genre); + } + + function testTagReplace() + { + $id3 = new ID3v1(); + + $id3->title = "Title 3"; + $this->assertEquals("Title 3", $id3->title); + $this->assertEquals("Unknown", $id3->genre); + + $id3->write("id3v1.tag"); + } + + function testTagReadAfterReplace() + { + $id3 = new ID3v1("id3v1.tag"); + $this->assertEquals("Title 3", $id3->title); + $this->assertEquals("", $id3->artist); + $this->assertEquals("", $id3->album); + $this->assertEquals("", $id3->year); + $this->assertEquals("", $id3->comment); + $this->assertEquals("", $id3->track); + $this->assertEquals("Unknown", $id3->genre); + } + + function testTagCreateVersion10() + { + $id3 = new ID3v1(); + + $id3->title = "Title 4"; + $this->assertEquals("Title 4", $id3->title); + + $id3->artist = "Artist 4"; + $this->assertEquals("Artist 4", $id3->artist); + + $id3->album = "Album 4"; + $this->assertEquals("Album 4", $id3->album); + + $id3->year = "2020"; + $this->assertEquals("2020", $id3->year); + + $id3->comment = "A comment field with 30 chars."; + $this->assertEquals("A comment field with 30 chars.", $id3->comment); + + $id3->genre = array_search("Classical", ID3v1::$genres); + $this->assertEquals("Classical", $id3->genre); + + $id3->write("id3v1.tag"); + } + + function testTagReadAfterCreateVersion10() + { + $id3 = new ID3v1("id3v1.tag"); + $this->assertEquals("Title 4", $id3->title); + $this->assertEquals("Artist 4", $id3->artist); + $this->assertEquals("Album 4", $id3->album); + $this->assertEquals("2020", $id3->year); + $this->assertEquals("A comment field with 30 chars.", $id3->comment); + $this->assertEquals("", $id3->track); + $this->assertEquals("Classical", $id3->genre); + } +} diff --git a/tests/TestTransform.php b/tests/TestTransform.php new file mode 100644 index 0000000..0962f9f --- /dev/null +++ b/tests/TestTransform.php @@ -0,0 +1,166 @@ + + * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup + * @license http://code.google.com/p/php-reader/wiki/License New BSD License + * @version $Rev$ + */ +final class TestTransform extends PHPUnit_Framework_TestCase +{ + function testInt64LE() + { + $this->assertEquals + (0x7fffffffffffffff, Transform::fromInt64BE + (Transform::toInt64BE(0x7fffffffffffffff))); + } + + function testInt64BE() + { + $this->assertEquals + (0x7fffffffffffffff, Transform::fromInt64BE + (Transform::toInt64BE(0x7fffffffffffffff))); + } + + function testInt32() + { + $this->assertEquals + (0x7fffffff, Transform::fromInt32(Transform::toInt32(0x7fffffff))); + } + + function testUInt32LE() + { + $this->assertEquals + ("78563412", Transform::fromHHex(Transform::toUInt32LE(0x12345678))); + $this->assertEquals + (0xffffffff, Transform::fromUInt32LE(Transform::toUInt32LE(0xffffffff))); + } + + function testUInt32BE() + { + $this->assertEquals + ("12345678", Transform::fromHHex(Transform::toUInt32BE(0x12345678))); + $this->assertEquals + (0xffffffff, Transform::fromUInt32BE(Transform::toUInt32BE(0xffffffff))); + } + + function testInt16() + { + $this->assertEquals + (0x7fff, Transform::fromInt16(Transform::toInt16(0x7fff))); + } + + function testUInt16LE() + { + $this->assertEquals + ("fffe", Transform::fromHHex(Transform::toUInt16LE(0xfeff))); + $this->assertEquals + (0xffff, Transform::fromUInt16LE(Transform::toUInt16LE(0xffff))); + } + + function testUInt16BE() + { + $this->assertEquals + ("feff", Transform::fromHHex(Transform::toUInt16BE(0xfeff))); + $this->assertEquals + (0xffff, Transform::fromUInt16BE(Transform::toUInt16BE(0xffff))); + } + + function testInt8() + { + $this->assertEquals(0x7f, Transform::fromInt8(Transform::toInt8(0x7f))); + } + + function testString16() + { + $this->assertEquals("00e4", Transform::fromHHex + (Transform::fromString16(Transform::toString16("\xff\xfe\xe4\x00")))); + $this->assertEquals("e400", Transform::fromHHex + (Transform::fromString16(Transform::toString16("\xfe\xff\x00\xe4")))); + } + + function testString16LE() + { + $this->assertEquals + ("fffe", Transform::fromHHex(Transform::toString16LE("\xff\xfe"))); + $this->assertEquals + ("\0T\0h\0i\0s\0 \0i\0s\0 \0a\0 \0t\0e\0s\0t\0.", + Transform::fromString16LE(Transform::toString16LE + ("\0T\0h\0i\0s\0 \0i\0s\0 \0a\0 \0t\0e\0s\0t\0."))); + } + + function testString16BE() + { + $this->assertEquals + ("feff", Transform::fromHHex(Transform::toString16BE("\xff\xfe"))); + $this->assertEquals + ("\0T\0h\0i\0s\0 \0i\0s\0 \0a\0 \0t\0e\0s\0t\0.", + Transform::fromString16BE(Transform::toString16BE + ("\0T\0h\0i\0s\0 \0i\0s\0 \0a\0 \0t\0e\0s\0t\0."))); + } + + function testHHex() + { + $this->assertEquals("6c34", bin2hex(Transform::toHHex("6c34"))); + $this->assertEquals("6c34", Transform::fromHHex(Transform::toHHex("6c34"))); + } + + function testLHex() + { + $this->assertEquals("c643", bin2hex(Transform::toLHex("6c34"))); + $this->assertEquals("6c34", Transform::fromLHex(Transform::toLHex("6c34"))); + } + + function testGUID() + { + $this->assertEquals + ("75b22630-668e-11cf-a6d9-00aa0062ce6c", + Transform::fromGUID(Transform::toGUID + ("75b22630-668e-11cf-a6d9-00aa0062ce6c"))); + } + +}