(PHP 5 >= 5.3.0, PHP 7, PECL phar >= 1.0.0)
Introduction
La classe Phar fournit une interface de haut niveau pour accéder et créer
des archives phar.
Synopsis de la classe
public void addFile
(
string $file
[,
string $localname
] )
public void addFromString
(
string $localname
,
string $contents
)
final public static bool canCompress
([
int $type
= 0
] )
final public static bool canWrite
(
void
)
public object compress
(
int $compression
[,
string $extension
] )
public __construct
(
string $fname
[,
int $flags
[,
string $alias
]] )
public PharData convertToData
([
int $format
= 9021976
[,
int $compression
= 9021976
[,
string $extension
]]] )
public Phar convertToExecutable
([
int $format
= 9021976
[,
int $compression
= 9021976
[,
string $extension
]]] )
public bool copy
(
string $oldfile
,
string $newfile
)
public int count
(
void
)
final public static string createDefaultStub
([
string $indexfile
[,
string $webindexfile
]] )
public bool delete
(
string $entry
)
public bool extractTo
(
string $pathto
[,
string|array $files
[,
bool $overwrite
= FALSE
]] )
final public static bool loadPhar
(
string $filename
[,
string $alias
] )
final public static bool mapPhar
([
string $alias
[,
int $dataoffset
= 0
]] )
final public static void mount
(
string $pharpath
,
string $externalpath
)
final public static void mungServer
(
array $munglist
)
public void offsetSet
(
string $offset
,
string $value
)
final public static string running
([
bool $retphar
= TRUE
] )
public bool setStub
(
string $stub
[,
int $len
= -1
] )
final public static void webPhar
([
string $alias
[,
string $index
= "index.php"
[,
string $f404
[,
array $mimetypes
[,
callable $rewrites
]]]]] )
}