This class represents the value of a chunk. Although a value in the chunks is always a string, which of course can also represent an integer, I created a whole class to keep track of other info about the value. Infact, every value has potentially a different format (used by pack and unpack function of PHP to extract the value - more info here: http://php.net/manual/en/function.pack.php) and size (in bytes).

LICENSE: "Audero Wav Extractor" (from now on "The software") is released under the CC BY-NC 3.0 ("Creative Commons Attribution NonCommercial 3.0") license. More details can be found here: http://creativecommons.org/licenses/by-nc/3.0/

WARRANTY: The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

author Aurelio De Rosa
version 1.0
license CC BY-NC 3.0
link https://bitbucket.org/AurelioDeRosa/audero-wav-extractor
package Audero\AuderoWavExtractor

 Methods

The default constructor

__construct(string $Format, int $Bytes) 

Parameters

$Format

string

The format of the field

$Bytes

int

The size of the field

Gets the size of the field

getBytes() : int

Returns

int

Gets the format of the field

getFormat() : string

Returns

string

Gets the value of the field

getValue() : mixed

Returns

mixed

Sets the size of the field

setBytes(int $Bytes) 

Parameters

$Bytes

int

Exceptions

\InvalidArgumentException If the value isn't positive or integer

Sets the format of the field

setFormat(string $Format) 

Parameters

$Format

string

Sets the value of the field

setValue(mixed $Value) 

Parameters

$Value

mixed

 Properties

 

The size in bytes of the field

$Bytes : int

 

The format of the field

$Format : string

 

The value of the field

$Value : mixed