(No version information available, might be only in CVS)
PharData::convertToTar — Convert a zip archive to the tar file format
This method is used to convert a phar archive in phar or zip format to the tar file format.
By default, the extension is .tar for converting from zip archives.
The method returns a PharData object on success and throws an exception on failure.
This method throws BadMethodCallException when unable to compress, an unknown compression method has been specified, the requested archive is buffering with PharData::startBuffering() and has not concluded with PharData::stopBuffering(), and a PharException if any problems are encountered during the tar creation process.
Example#1 A PharData::convertToTar() example
Using PharData::convertToTar():
<?php
try {
$zip = new PharData('myphar.zip');
$tar = $zip->convertToTar();
} catch (Exception $e) {
// handle the error here
}
?>