Man Page: pharfileinfo.delmetadata
Operating Environment: php
Section: 3
PHARFILEINFO.DELMETADATA(3) 1 PHARFILEINFO.DELMETADATA(3) PharFileInfo::delMetadata - Deletes the metadata of the entrySYNOPSISpublic bool PharFileInfo::delMetadata (void )DESCRIPTIONDeletes the metadata of the entry, if any.PARAMETERSNo parameters.RETURN VALUESReturns TRUE if successful, FALSE if the entry had no metadata. As with all functionality that modifies the contents of a phar, the phar.readonly INI variable must be off in order to succeed if the file is within a Phar archive. Files within PharData archives do not have this restriction.ERRORS/EXCEPTIONS Throws PharException if errors occurred while flushing changes to disk, and BadMethodCallException if write access is disabled.EXAMPLESExample #1 A PharFileInfo.delMetaData(3) example <?php try { $a = new Phar('myphar.phar'); $a['hi'] = 'hi'; var_dump($a['hi']->delMetadata()); $a['hi']->setMetadata('there'); var_dump($a['hi']->delMetadata()); var_dump($a['hi']->delMetadata()); } catch (Exception $e) { // handle errors } ?> The above example will output: bool(false) bool(true) bool(false)SEE ALSOPharFileInfo.setMetadata(3), PharFileInfo.hasMetadata(3), PharFileInfo.getMetadata(3), Phar.setMetadata(3), Phar.hasMetadata(3), Phar.get- Metadata(3). PHP Documentation Group PHARFILEINFO.DELMETADATA(3)
| Related Man Pages |
|---|
| phar(3) - php |
| phar.setmetadata(3) - php |
| phar.delmetadata(3) - php |
| pharfileinfo.getmetadata(3) - php |
| pharfileinfo.chmod(3) - php |