blob: 2284eba292a29727a613adf6343d9be6f851819e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<?php
/**
* Description of FileDate
*
* @author Sander
*/
class FileDate extends FileObject {
private $data;
/**
* Make an integer to be stored in a file
* @param int $n
*/
public function __construct($n = 0){
parent::__construct(4);
$this->set($n);
}
public function get(){
return $this->data;
}
public function set($value){
$this->data = intval($value);
}
public function serialize() {
return $this->intToString($this->data);
}
public function unserialize($data) {
__construct($this->toInt($data));
}
public function __toString(){
return "FileDate: {".(date("r", $this->data-94694400))."}";
}
}
?>
|