diff options
author | tcit <tcit@tcit.fr> | 2014-07-24 15:49:36 +0200 |
---|---|---|
committer | tcit <tcit@tcit.fr> | 2014-07-24 15:49:36 +0200 |
commit | 4188f38ad56d7ba2ea46e94403f305243514f80c (patch) | |
tree | f357ddbd0d846ebae0ecf5d2ab00d6b7dd6eb8d5 /inc/3rdparty/libraries/send2kindle/MOBIClass/PEOFRecord.php | |
parent | 2b58426b2d4a7f1585d5d7667c0a4fbea4cd29dd (diff) | |
download | wallabag-4188f38ad56d7ba2ea46e94403f305243514f80c.tar.gz wallabag-4188f38ad56d7ba2ea46e94403f305243514f80c.tar.zst wallabag-4188f38ad56d7ba2ea46e94403f305243514f80c.zip |
add pdf and mobi libraries
Diffstat (limited to 'inc/3rdparty/libraries/send2kindle/MOBIClass/PEOFRecord.php')
-rw-r--r-- | inc/3rdparty/libraries/send2kindle/MOBIClass/PEOFRecord.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/inc/3rdparty/libraries/send2kindle/MOBIClass/PEOFRecord.php b/inc/3rdparty/libraries/send2kindle/MOBIClass/PEOFRecord.php new file mode 100644 index 00000000..a2b0fee8 --- /dev/null +++ b/inc/3rdparty/libraries/send2kindle/MOBIClass/PEOFRecord.php | |||
@@ -0,0 +1,49 @@ | |||
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 | } \ No newline at end of file | ||