diff options
author | tcit <tcit@tcit.fr> | 2014-07-24 21:56:04 +0200 |
---|---|---|
committer | tcit <tcit@tcit.fr> | 2014-07-24 21:56:04 +0200 |
commit | fb9df0c269f36703909b8b259abbdbed29881ecd (patch) | |
tree | 03069262fe6a7bd5891f5649d31fc057b3ca8541 /inc/3rdparty/libraries/send2kindle/MOBIClass/FileShort.php | |
parent | c70bfefc68fcc96b1ce57845e5b2942a596239ec (diff) | |
download | wallabag-fb9df0c269f36703909b8b259abbdbed29881ecd.tar.gz wallabag-fb9df0c269f36703909b8b259abbdbed29881ecd.tar.zst wallabag-fb9df0c269f36703909b8b259abbdbed29881ecd.zip |
use directly MOBIClass
Diffstat (limited to 'inc/3rdparty/libraries/send2kindle/MOBIClass/FileShort.php')
-rw-r--r-- | inc/3rdparty/libraries/send2kindle/MOBIClass/FileShort.php | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/inc/3rdparty/libraries/send2kindle/MOBIClass/FileShort.php b/inc/3rdparty/libraries/send2kindle/MOBIClass/FileShort.php deleted file mode 100644 index 9921ea82..00000000 --- a/inc/3rdparty/libraries/send2kindle/MOBIClass/FileShort.php +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | /** | ||
4 | * Description of FileShort | ||
5 | * | ||
6 | * @author Sander | ||
7 | */ | ||
8 | class FileShort extends FileObject { | ||
9 | private $data; | ||
10 | |||
11 | /** | ||
12 | * Make a short to be stored in a file | ||
13 | * @param short $n | ||
14 | */ | ||
15 | public function __construct($n = 0){ | ||
16 | parent::__construct(2); | ||
17 | $this->set($n); | ||
18 | } | ||
19 | |||
20 | public function get(){ | ||
21 | return $this->data; | ||
22 | } | ||
23 | |||
24 | public function set($value){ | ||
25 | $this->data = intval($value) & 0xFFFF; | ||
26 | } | ||
27 | |||
28 | public function serialize() { | ||
29 | return $this->shortToString($this->data); | ||
30 | } | ||
31 | |||
32 | public function unserialize($data) { | ||
33 | __construct($this->toInt($data)); | ||
34 | } | ||
35 | |||
36 | |||
37 | public function __toString(){ | ||
38 | return "FileShort: {".$this->shortAsString($this->data)."}"; | ||
39 | } | ||
40 | } | ||
41 | ?> | ||