aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/3rdparty/libraries/MOBIClass/FileRecord.php
blob: 494a72e4b79154e4a96df7f3ca7b9495262ec55c (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
41
42
43
44
45
46
<?php

/**
 * Description of FileRecord
 *
 * @author Sander
 */
class FileRecord extends FileObject {
	/**
	 * @var Record
	 */
	private $record;

	/**
	 * Make a record to be stored in a file
	 * @param Record $record
	 */
	public function __construct($record){
		$this->record = $record;
	}

	public function getByteLength(){
		return $this->getLength();
	}

	public function getLength(){
		return $this->record->getLength();
	}

	public function get(){
		return $this->record;
	}

	public function set($record){
		$this->record = $record;
	}

	public function serialize() {
		return $this->record->serialize();
	}

	public function unserialize($data) {
		__construct($this->record->unserialize($data));
	}
}
?>