The PharData class
(PHP >= 5.3.0, PECL phar >= 2.0.0)
Introduction
The PharData class provides a high-level interface to accessing and creating
non-executable tar and zip archives. Because these archives do not contain
a stub and cannot be executed by the phar extension, it is possible to create
and manipulate regular zip and tar files using the PharData class even if
phar.readonly php.ini setting is 1.
Class synopsis
public void Phar::addFile
(
string $file
[,
string $localname
] )
object compress
(
int $compression
[,
string $extension
] )
__construct
(
string $fname
[,
int $flags
[,
string $alias
[,
int $format
= Phar::TAR
]]] )
PharData convertToData
([
int $format
[,
int $compression
[,
string $extension
]]] )
bool copy
(
string $oldfile
,
string $newfile
)
bool extractTo
(
string $pathto
[,
string|array $files
[,
bool $overwrite
= false
]] )
void offsetSet
(
string $offset
,
string $value
)
bool setStub
(
string $stub
[,
int $len
= -1
] )
public void Phar::addFile
(
string $file
[,
string $localname
] )
public object Phar::compress
(
int $compression
[,
string $extension
] )
public PharData Phar::convertToData
([
int $format
= 9021976
[,
int $compression
= 9021976
[,
string $extension
]]] )
public bool Phar::copy
(
string $oldfile
,
string $newfile
)
public bool Phar::extractTo
(
string $pathto
[,
string|array $files
[,
bool $overwrite
= false
]] )
final public static bool Phar::loadPhar
(
string $filename
[,
string $alias
] )
final public static bool Phar::mapPhar
([
string $alias
[,
int $dataoffset
= 0
]] )
final public static void Phar::mount
(
string $pharpath
,
string $externalpath
)
final public static string Phar::running
([
bool $retphar
= true
] )
final public static void Phar::webPhar
([
string $alias
[,
string $index
= "index.php"
[,
string $f404
[,
array $mimetypes
[,
callable $rewrites
]]]]] )
}
Table of Contents
User Contributed Notes
There are no user contributed notes for this page.