\PHPExcel_Shared_ZipArchive

PHPExcel_Shared_ZipArchive

Copyright (c) 2006 - 2015 PHPExcel

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Summary

Methods
Properties
Constants
open()
close()
addFromString()
locateName()
getFromName()
getFromIndex()
No public properties found
OVERWRITE
CREATE
No protected methods found
No protected properties found
N/A
No private methods found
$tempDir
$zip
N/A

Constants

OVERWRITE

OVERWRITE = 'OVERWRITE'

constants

CREATE

CREATE = 'CREATE'

Properties

$tempDir

$tempDir : string

Temporary storage directory

Type

string

$zip

$zip : string

Zip Archive Stream Handle

Type

string

Methods

open()

open(string  $fileName) : boolean

Open a new zip archive

Parameters

string $fileName

Filename for the zip archive

Returns

boolean

close()

close() 

Close this zip archive

addFromString()

addFromString(string  $localname, string  $contents) 

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

Parameters

string $localname

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

string $contents

String of data to add to the zip archive

locateName()

locateName(string  $fileName) : boolean

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

Parameters

string $fileName

Filename for the file in zip archive

Returns

boolean

getFromName()

getFromName(string  $fileName) : string

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

Parameters

string $fileName

Filename for the file in zip archive

Returns

string —

$contents File string contents

getFromIndex()

getFromIndex(  $index) 

Parameters

$index