1 : <?php
2 :
3 : /**
4 : * \Midi\Chunk
5 : *
6 : * @package Midi
7 : * @copyright © 2009 Tommy Montgomery <http://phpmidiparser.com>
8 : * @since 1.0
9 : */
10 :
11 : namespace Midi;
12 :
13 : /**
14 : * Represents a MIDI chunk (event, delta time, file header, etc.)
15 : *
16 : * @package Midi
17 : * @since 1.0
18 : */
19 1 : interface Chunk {
20 :
21 : /**
22 : * Gets the data associated with this chunk
23 : *
24 : * @since 1.0
25 : *
26 : * @return array
27 : */
28 : public function getData();
29 :
30 : /**
31 : * Gets the string representation of this chunk
32 : *
33 : * @since 1.0
34 : *
35 : * @return string
36 : */
37 : public function __toString();
38 :
39 : /**
40 : * Gets the binary representation of this chunk
41 : *
42 : * @since 1.0
43 : *
44 : * @return binary
45 : */
46 : public function toBinary();
47 :
48 : /**
49 : * Gets the length of this chunk in bytes
50 : *
51 : * @since 1.0
52 : *
53 : * @return int
54 : */
55 : public function getLength();
56 :
57 : }
58 :
|