* @author Aurelien Bompard * @author LarsDW223 */ class ODTManifest { var $manifest = array(); /** * Returns the complete manifest content. */ function getContent(){ $value = '<' . '?xml version="1.0" encoding="UTF-8"?' . ">\n"; $value .= ''; $value .= ''; $value .= ''; $value .= ''; $value .= ''; $value .= ''; $value .= $this->getExtraContent(); $value .= ''; return $value; } /** * Returns only the xml lines containing the dynamically added user content * files like images etc.. */ function getExtraContent() { $value = ''; foreach($this->manifest as $path => $type){ $value .= ''; } return $value; } /** * Checks if $name is present or was added to the manifest data. * * @param string $name * @return bool */ function exists($name) { return isset($this->manifest[$name]); } /** * Adds $name with $mime to the manifest data. * * @param string $name * @param string $mime */ function add($name, $mime) { $this->manifest[$name] = $mime; } }