]>
Commit | Line | Data |
---|---|---|
4188f38a | 1 | <?php |
2 | /** | |
3 | * A Record of a End file | |
4 | * | |
5 | * @author Pratyush | |
6 | */ | |
7 | class PEOFRecord extends FileObject { | |
8 | /** | |
9 | * @var FileElement | |
10 | */ | |
11 | private $elements; | |
12 | ||
13 | public function __construct($leng){ | |
14 | $this->elements = new FileElement(array( | |
15 | ||
16 | "offset44"=>new FileInt(0xe98e0d0a) | |
17 | )); | |
18 | } | |
19 | public function getByteLength(){ | |
20 | return $this->getLength(); | |
21 | } | |
22 | ||
23 | public function getLength(){ | |
24 | return $this->elements->getByteLength(); | |
25 | } | |
26 | ||
27 | public function get(){ | |
28 | return $this; | |
29 | } | |
30 | ||
31 | public function set($elements){ | |
32 | throw new Exception("Unallowed set"); | |
33 | } | |
34 | ||
35 | public function serialize() { | |
36 | return $this->elements->serialize(); | |
37 | } | |
38 | ||
39 | public function unserialize($data) { | |
40 | $this->elements->unserialize($data); | |
41 | } | |
42 | ||
43 | public function __toString(){ | |
44 | $output = "PalmDoc Record (".$this->getByteLength()." bytes):\n"; | |
45 | $output .= $this->elements; | |
46 | return $output; | |
47 | } | |
48 | ||
49 | } |