PHP Class Spatie\Backup\Tasks\Backup\Zip

Show file Open project: spatie/laravel-backup Class Usage Examples

Protected Properties

Property Type Description
$fileCount integer
$pathToZip string
$zipFile ZipArchive

Public Methods

Method Description
__construct ( string $pathToZip )
add ( string | array $files, string $nameInZip = null ) : Zip
close ( )
count ( ) : integer
createForManifest ( Manifest $manifest, string $pathToZip ) : Zip
humanReadableSize ( ) : string
open ( )
path ( ) : string
size ( ) : integer

Protected Methods

Method Description
determineNameOfFileInZip ( string $pathToFile, string $pathToZip )

Method Details

__construct() public method

public __construct ( string $pathToZip )
$pathToZip string

add() public method

public add ( string | array $files, string $nameInZip = null ) : Zip
$files string | array
$nameInZip string
return Zip

close() public method

public close ( )

count() public method

public count ( ) : integer
return integer

createForManifest() public static method

public static createForManifest ( Manifest $manifest, string $pathToZip ) : Zip
$manifest Manifest
$pathToZip string
return Zip

determineNameOfFileInZip() protected static method

protected static determineNameOfFileInZip ( string $pathToFile, string $pathToZip )
$pathToFile string
$pathToZip string

humanReadableSize() public method

public humanReadableSize ( ) : string
return string

open() public method

public open ( )

path() public method

public path ( ) : string
return string

size() public method

public size ( ) : integer
return integer

Property Details

$fileCount protected property

protected int $fileCount
return integer

$pathToZip protected property

protected string $pathToZip
return string

$zipFile protected property

protected ZipArchive $zipFile
return ZipArchive