Man Page: pharfileinfo.getmetadata
Operating Environment: php
Section: 3
PHARFILEINFO.GETMETADATA(3) 1 PHARFILEINFO.GETMETADATA(3) PharFileInfo::getMetadata - Returns file-specific meta-data saved with a fileSYNOPSISpublic mixed PharFileInfo::getMetadata (void )DESCRIPTIONReturn meta-data that was saved in the Phar archive's manifest for this file.PARAMETERSRETURN VALUESany PHP variable that can be serialized and is stored as meta-data for the file, or NULL if no meta-data is stored.EXAMPLESExample #1 A PharFileInfo.getMetadata(3) example <?php // make sure it doesn't exist @unlink('brandnewphar.phar'); try { $p = new Phar(dirname(__FILE__) . '/brandnewphar.phar', 0, 'brandnewphar.phar'); $p['file.txt'] = 'hello'; $p['file.txt']->setMetadata(array('user' => 'bill', 'mime-type' => 'text/plain')); var_dump($p['file.txt']->getMetadata()); } catch (Exception $e) { echo 'Could not create/modify brandnewphar.phar: ', $e; } ?> The above example will output: array(2) { ["user"]=> string(4) "bill" ["mime-type"]=> string(10) "text/plain" }SEE ALSOPharFileInfo.setMetadata(3), PharFileInfo.hasMetadata(3), PharFileInfo.delMetadata(3), Phar.setMetadata(3), Phar.hasMetadata(3), Phar.get- Metadata(3). PHP Documentation Group PHARFILEINFO.GETMETADATA(3)