Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

phar.delmetadata(3) [php man page]

PHAR.DELMETADATA(3)							 1						       PHAR.DELMETADATA(3)

Phar::delMetadata - Deletes the global metadata of the phar

SYNOPSIS
public bool Phar::delMetadata (void ) DESCRIPTION
Note This method requires the php.ini setting phar.readonly to be set to 0 in order to work for Phar objects. Otherwise, a PharException will be thrown. Deletes the global metadata of the phar PARAMETERS
RETURN VALUES
returns TRUE on success, but it is better to check for thrown exception, and assume success if none is thrown. ERRORS
/EXCEPTIONS Throws PharException if errors occur while flushing changes to disk. EXAMPLES
Example #1 A Phar.delMetaData(3) example <?php try { $phar = new Phar('myphar.phar'); var_dump($phar->getMetadata()); $phar->setMetadata("hi there"); var_dump($phar->getMetadata()); $phar->delMetadata(); var_dump($phar->getMetadata()); } catch (Exception $e) { // handle errors } ?> The above example will output: NULL string(8) "hi there" NULL SEE ALSO
Phar.getMetadata(3), Phar.setMetadata(3), Phar.hasMetadata(3). PHP Documentation Group PHAR.DELMETADATA(3)

Check Out this Related Man Page

PHAR.CREATEDEFAULTSTUB(3)						 1						 PHAR.CREATEDEFAULTSTUB(3)

Phar::createDefaultStub - Create a phar-file format specific stub

SYNOPSIS
finalpublicstatic string Phar::createDefaultStub ([string $indexfile], [string $webindexfile]) DESCRIPTION
This method is intended for creation of phar-file format-specific stubs, and is not intended for use with tar- or zip-based phar archives. Phar archives contain a bootstrap loader, or stub written in PHP that is executed when the archive is executed in PHP either via include: <?php include 'myphar.phar'; ?> php myphar.phar This method provides a simple and easy method to create a stub that will run a startup file from the phar archive. In addition, different files can be specified for running the phar archive from the command line versus through a web server. The loader stub also calls Phar.interceptFileFuncs(3) to allow easy bundling of a PHP application that accesses the file system. If the phar extension is not present, the loader stub will extract the phar archive to a temporary directory and then operate on the files. A shutdown function erases the tempo- rary files on exit. RETURN VALUES
Returns a string containing the contents of a customized bootstrap loader (stub) that allows the created Phar archive to work with or without the Phar extension enabled. ERRORS
/EXCEPTIONS Throws UnexpectedValueException if either parameter is longer than 400 bytes. EXAMPLES
Example #1 A Phar.createDefaultStub(3) example <?php try { $phar = new Phar('myphar.phar'); $phar->setStub($phar->createDefaultStub('cli.php', 'web/index.php')); } catch (Exception $e) { // handle errors } ?> SEE ALSO
Phar.setStub(3), Phar.getStub(3). PHP Documentation Group PHAR.CREATEDEFAULTSTUB(3)
Man Page