aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/3rdparty/libraries/MOBIClass/FileInt.php
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2015-02-18 19:17:31 +0100
committerThomas Citharel <tcit@tcit.fr>2015-02-18 19:17:31 +0100
commit4b1fa4c2febc7abbc6da3d65e4e760949a55843c (patch)
treea93ec906dbb03ec70e9cdc5dc876392c6d758e97 /inc/3rdparty/libraries/MOBIClass/FileInt.php
parent364953ede585b75fb29dc94b1c5f853053eaed0b (diff)
parentdf89c6f71adebfdb754ec3eb2fd775d8efbdb280 (diff)
downloadwallabag-4b1fa4c2febc7abbc6da3d65e4e760949a55843c.tar.gz
wallabag-4b1fa4c2febc7abbc6da3d65e4e760949a55843c.tar.zst
wallabag-4b1fa4c2febc7abbc6da3d65e4e760949a55843c.zip
Merge pull request #1081 from wallabag/dev1.9
Version 1.9.0
Diffstat (limited to 'inc/3rdparty/libraries/MOBIClass/FileInt.php')
-rw-r--r--inc/3rdparty/libraries/MOBIClass/FileInt.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/inc/3rdparty/libraries/MOBIClass/FileInt.php b/inc/3rdparty/libraries/MOBIClass/FileInt.php
new file mode 100644
index 00000000..ebe86f86
--- /dev/null
+++ b/inc/3rdparty/libraries/MOBIClass/FileInt.php
@@ -0,0 +1,40 @@
1<?php
2
3/**
4 * Description of FileInt
5 *
6 * @author Sander
7 */
8class FileInt extends FileObject {
9 private $data;
10
11 /**
12 * Make an integer to be stored in a file
13 * @param int $n
14 */
15 public function __construct($n = 0){
16 parent::__construct(4);
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);
26 }
27
28 public function serialize() {
29 return $this->intToString($this->data);
30 }
31
32 public function unserialize($data) {
33 __construct($this->toInt($data));
34 }
35
36 public function __toString(){
37 return "FileInt: {".$this->intAsString($this->data)."}";
38 }
39}
40?>