PharData::convertToZip

(No version information available, might be only in CVS)

PharData::convertToZip — Convert a tar archive to the zip file format

Описание

bool PharData::convertToZip ( string $extension )

This method is used to convert a phar archive in phar or tar format to the zip file format.

Список параметров

extension

By default, the extension is .zip for converting from tar archives.

Возвращаемые значения

The method returns a PharData object on success and throws an exception on failure.

Errors/Exceptions

This method throws BadMethodCallException when 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 zip creation process.

Примеры

Пример #1 A PharData::convertToZip() example

Using PharData::convertToZip():

<?php
try {
    
$tar = new PharData('myphar.tar.gz');
    
// convert it to the zip file format
    
$zip $tar->convertToZip();
} catch (
Exception $e) {
    
// handle the error here
}
?>

Смотрите также

[an error occurred while processing the directive]

Коментарии

404 Not Found

404 Not Found


nginx

    Поддержать сайт на родительском проекте КГБ