pharfileinfo.delmetadata(3) php man page | unix.com

Man Page: pharfileinfo.delmetadata

Operating Environment: php

Section: 3

PHARFILEINFO.DELMETADATA(3)						 1					       PHARFILEINFO.DELMETADATA(3)

PharFileInfo::delMetadata - Deletes the metadata of the entry

SYNOPSIS
public bool PharFileInfo::delMetadata (void )
DESCRIPTION
Deletes the metadata of the entry, if any.
PARAMETERS
No parameters.
RETURN VALUES
Returns 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.
EXAMPLES
Example #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 ALSO
PharFileInfo.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.setstub(3) - php
phar(3) - php
phar.setmetadata(3) - php
phar.createdefaultstub(3) - php
phar.interceptfilefuncs(3) - php
Similar Topics in the Unix Linux Community
Simple rules of the UNIX.COM forums:
UNIX.COM 2017 Year End Summary
Status of UNIX.COM Forum Transformation
The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Don Cragun
Denial Of Service Attack Update