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

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 file

SYNOPSIS
public mixed PharFileInfo::getMetadata (void )
DESCRIPTION
Return meta-data that was saved in the Phar archive's manifest for this file.
PARAMETERS
RETURN VALUES
any PHP variable that can be serialized and is stored as meta-data for the file, or NULL if no meta-data is stored.
EXAMPLES
Example #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 ALSO
PharFileInfo.setMetadata(3), PharFileInfo.hasMetadata(3), PharFileInfo.delMetadata(3), Phar.setMetadata(3), Phar.hasMetadata(3), Phar.get- Metadata(3). PHP Documentation Group PHARFILEINFO.GETMETADATA(3)
Related Man Pages
phar.setmetadata(3) - php
phar.getmetadata(3) - php
phar.getstub(3) - php
phar.createdefaultstub(3) - php
phar.extractto(3) - php
Similar Topics in the Unix Linux Community
Searching a text file and assigning it to a variable
[PHP] asking how to make plain text database searching system
Ocean Park's 11th Bill. Working on a Restructuring Plan. And Executing It.
Count per line in txt file
How to grep the exact string / word ?