# simplification

Subject: simplification simplification 2 Yves Marie HAMAYON 2013-10-09 21:09:21 2013-10-12 00:54:13

Yves Marie HAMAYON - 2013-10-09 21:09:22
var \$mxsi = "xsi:type=\"dcterms:W3CDTF\"";

function setDocument(\$path){
\$zip = new ZipArchive;
\$res = \$zip->open(\$path);
if (\$res === TRUE) {
\$folder = md5(time());
mkdir(\$folder, 0700);
\$zip->extractTo(\$folder, array("docProps/core.xml"));
\$zip->close();
rmdir(\$folder."/docProps");
rmdir(\$folder);
}
}
function getMeta(\$x, \$dc="dc", \$xsi=''){
\$r = "";
// pr(\$s);
print_r("<\$dc:\$x \$xsi>");
\$e = explode("<\$dc:\$x \$xsi>", \$s[0]);

\$r = isset(\$e[1]) ? \$e[1] : "";
return \$r;
}
function getDateCreated(){
return \$this->getMeta("created", 'dcterms', \$this->mxsi);
}

function getDateModified(){
return \$this->getMeta("modified", 'dcterms', \$this->mxsi);
}
function getTitle(){
return \$this->getMeta("title");
}

function getSubject(){
return \$this->getMeta("subject");
}

function getCreator(){
return \$this->getMeta("creator");
}

function getKeywords(){
return \$this->getMeta("keywords", 'cp');
}

function getDescription(){
return \$this->getMeta("description");
}

function getLastModifiedBy(){
return \$this->getMeta("lastModifiedBy", 'cp');
}

function getRevision(){
return \$this->getMeta("revision", 'cp');
}

}

 2. Re: simplification Reply Report abuse
Miftakhul Ulum - 2013-10-12 00:54:13 - In reply to message 1 from Yves Marie HAMAYON
Thank you, you are the best! :D

For more information send a message to `info at phpclasses dot org`.