From 3d99ce9dadca82765832ab669dabc22c554fd78e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 19 Jan 2015 13:37:32 +0100 Subject: travis configuration --- inc/3rdparty/libraries/MOBIClass/FileElement.php | 89 ------------------------ 1 file changed, 89 deletions(-) delete mode 100644 inc/3rdparty/libraries/MOBIClass/FileElement.php (limited to 'inc/3rdparty/libraries/MOBIClass/FileElement.php') diff --git a/inc/3rdparty/libraries/MOBIClass/FileElement.php b/inc/3rdparty/libraries/MOBIClass/FileElement.php deleted file mode 100644 index 552d04a8..00000000 --- a/inc/3rdparty/libraries/MOBIClass/FileElement.php +++ /dev/null @@ -1,89 +0,0 @@ -elements = $elements; - } - - public function getByteLength(){ - return $this->getLength(); - } - - public function getLength(){ - $total = 0; - foreach($this->elements as $val){ - $total += $val->getByteLength(); - } - return $total; - } - - public function offsetToEntry($name){ - $pos = 0; - foreach($this->elements as $key=>$value){ - if($name == $key){ - break; - } - $pos += $value->getByteLength(); - } - return $pos; - } - - public function exists($key){ - return isset($this->elements[$key]); - } - /** - * @param string $key - * @return FileObject - */ - public function get($key){ - return $this->elements[$key]; - } - - /** - * @param string $key - * @param FileObject $value - */ - public function set($key, $value){ - $this->elements[$key] = $value; - } - - public function add($key, $value){ - $this->elements[$key] = $value; - } - - public function serialize() { - $result = ""; - foreach($this->elements as $val){ - $result .= $val->serialize(); - } - return $result; - } - - public function unserialize($data) { - //TODO: If reading is needed -> way more complex - } - - public function __toString(){ - $output = "FileElement (".$this->getByteLength()." bytes): {\n"; - foreach($this->elements as $key=>$value){ - $output .= "\t".$key.": ".$value."\n"; - } - $output .= "}"; - return $output; - } -} -?> -- cgit v1.2.3