Child classes:
- VArchiveZip
- VWP Zip archive driver
- VArchiveBzip2
- VWP Bzip2 archive driver
- VArchiveTar
- VWP Tar driver
- VArchiveGzip
- VWP GZip archive driver
Inherited Variables
Inherited Constants
Inherited Methods
Class: VObject
- VObject::__construct()
- Class Constructor
- VObject::bind()
- Bind values to this object
- VObject::delete()
- Delete Object
- VObject::get()
- Get value
- VObject::getAll()
- Get all object values
- VObject::getError()
- Get error message
- VObject::getErrors()
- Get errors
- VObject::getMethods()
- Get object methods
- VObject::getProperties()
- Get object properties
- VObject::save()
- Save Object
- VObject::set()
- Set a value
- VObject::setError()
- Set error value
- VObject::setProperties()
- Set property values
- VObject::setProperty()
- Set property value
- VObject::toString()
- Convert object to string
- VObject::__destruct()
- Class Destructor
- VObject::__get()
- VObject::__isset()
- VObject::__set()
- VObject::__toString()
- Return object as a string
- VObject::__unset()
Class Details
Virtual Web Platform - Archive Support
This Class provides Archive Support
Tags:
- author - Ralph Ritoch <rritoch@gmail.com>
- copyright - (c) Ralph Ritoch - All Rights Reserved
- link - VNetPublishing.Com
- license - VNETLPL Limited Public License
[ Top ]
Class Variables
$_vfile
[line 54]
Link to VFile object
Tags:
- access - public
Type: object
Overrides:
[ Top ]
$_vfolder
[line 63]
Link to VFolder object
Tags:
- access - public
Type: object
Overrides:
[ Top ]
Class Methods
static getDriver
static object Archive &getDriver(
string
$type)
[line 206]
Get archive driver
Tags:
- return - Driver on success, error or warning otherwise
- access - public
Parameters:
- string $type - Archive type
[ Top ]
static getInstance
static object VArchive &getInstance(
)
[line 72]
Get a VArchive object
Tags:
- return - object
- access - public
Parameters:
[ Top ]
__construct
VArchive __construct(
)
[line 381]
Class constructor
Tags:
- access - public
Overrides VObject::__construct() (Class Constructor)
Parameters:
[ Top ]
create
void create(
string
$archive, mixed
$files, [array
$options = array()], [string
$compress = 'tar'], [string
$addPath = ''], [string
$removePath = ''], [boolean
$autoExt = false], [boolean
$cleanUp = false])
[line 321]
Create an archive
Tags:
- access - public
Overridden in child classes as:
- VArchiveZip::create()
- Create a ZIP compressed file from an array of file data.
Parameters:
- string $archive - The name of the archive
- mixed $files - The name of a single file or an array of files
- array $options - Archive options
- string $compress - The compression for the archive
- string $addPath - Path to add within the archive
- string $removePath - Path to remove within the archive
- boolean $autoExt - Automatically append the extension for the archive
- boolean $cleanUp - Remove for source files
[ Top ]
extract
boolean|object True extract(
string
$archivename, string
$extractdir)
[line 92]
Extract an archive
Tags:
- return - for success warning or error otherwise
- access - public
Overridden in child classes as:
- VArchiveZip::extract()
- Extract a ZIP compressed file to a given path
- VArchiveBzip2::extract()
- Extract a Bzip2 compressed file to a given path
- VArchiveTar::extract()
- Extract a Tar file to a given path
- VArchiveGzip::extract()
- Extract a Gzip compressed file to a given path
Parameters:
- string $archivename - The name of the archive file
- string $extractdir - Directory to unpack into
[ Top ]
_cleanPath
string _cleanPath(
string
$path)
[line 243]
Clean file path
Removes double slashes and returns a clean path
Tags:
- return - Clean path name
- access - public
Parameters:
- string $path - Path to clean
[ Top ]
_createArchiveFileList
array _createArchiveFileList(
&$files, string
$addPath, string
$removePath, array
$files)
[line 270]
Reformat a list of files into an archive file list
Tags:
- return - Archive formatted file list
- access - public
Parameters:
- array $files - File list
- string $addPath - Archive path prefix to add to output
- string $removePath - Strip source path prefix from input
- &$files -
[ Top ]