PHPExcel classes » \PHPExcel_Shared_ZipArchive

PHPExcel_Shared_ZipArchive

category | PHPExcel
package | PHPExcel_Shared_ZipArchive
copyright | Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

### Methods

## Add a new file to the zip archive from a string of raw data.

    addFromString(string $localname, string $contents)

### Parameters

#### $localname

`string`

Directory/Name of the file to add to the zip archive

#### $contents

`string`

String of data to add to the zip archive

## Close this zip archive

    close()

## Extract file from archive by given fileName (Emulate ZipArchive getFromName())

    getFromName(string $fileName) : string

### Parameters

#### $fileName

`string`

Filename for the file in zip archive

### Returns

`string`$contents File string contents

## Find if given fileName exist in archive (Emulate ZipArchive locateName())

    locateName(string $fileName) : boolean

### Parameters

#### $fileName

`string`

Filename for the file in zip archive

### Returns

`boolean`

## Open a new zip archive

    open(string $fileName) : boolean

### Parameters

#### $fileName

`string`

Filename for the zip archive

### Returns

`boolean`

### Properties

##

    $_tempDir : string

##

    $_zip : string

### Constants

## CREATE

    CREATE

## constants

    OVERWRITE