* @author Aurelien Bompard * @author LarsDW223 */ class ODTMeta { var $meta = array(); /** * Constructor. Set initial meta data. */ public function __construct() { $this->meta = array( 'meta:generator' => 'DokuWiki '.getversion(), 'meta:initial-creator' => 'Generated', 'meta:creation-date' => date('Y-m-d\\TH::i:s', null), //FIXME 'dc:creator' => 'Generated', 'dc:date' => date('Y-m-d\\TH::i:s', null), 'dc:language' => 'en-US', 'meta:editing-cycles' => '1', 'meta:editing-duration' => 'PT0S', ); } /** * @param string $title */ function setTitle ($title) { $this->meta ['dc:title'] = $title; } /** * Returns the complete meta content. */ function getContent(){ $value = '<' . '?xml version="1.0" encoding="UTF-8"?' . ">\n"; $value .= 'meta as $meta_key => $meta_value) { $value .= '<' . $meta_key . '>' . htmlspecialchars($meta_value, ENT_QUOTES, 'UTF-8') . ''; } $value .= ''; $value .= ''; return $value; } }