The Phar class
(Ingen versionsoplysninger tilgængelige, findes måske kun i SVN)
Introduktion
The Phar class provides a high-level interface to accessing and creating
phar archives.
Klasse synopsis
void addFile
(
string $file
[,
string $localname
] )
object compress
(
int $compression
[,
string $extension
] )
__construct
(
string $fname
[,
int $flags
[,
string $alias
]] )
PharData convertToData
([
int $format
= 9021976
[,
int $compression
= 9021976
[,
string $extension
]]] )
Phar convertToExecutable
([
int $format
= 9021976
[,
int $compression
= 9021976
[,
string $extension
]]] )
bool copy
(
string $oldfile
,
string $newfile
)
bool extractTo
(
string $pathto
[,
string|array $files
[,
bool $overwrite
= false
]] )
bool loadPhar
(
string $filename
[,
string $alias
] )
bool mapPhar
([
string $alias
[,
int $dataoffset
= 0
]] )
void mount
(
string $pharpath
,
string $externalpath
)
void offsetSet
(
string $offset
,
string $value
)
string running
([
bool $retphar
= true
] )
void webPhar
([
string $alias
[,
string $index
= "index.php"
[,
string $f404
[,
array $mimetypes
[,
array $rewrites
]]]]] )
}
Indholdsfortegnelse
cornelius dot howl at gmail dot com ¶12 years ago
Onion utility can help you compile a package into a phar file (executable script file or library file)
https://github.com/c9s/Onion
$ onion.phar compile \
--executable \
--classloader \
--bootstrap scripts/onion.embed \
--lib src \
--lib ../CLIFramework/src \
--lib ../GetOptionKit/src \
--output onion.phar
halfdan ¶15 years ago
Hey, I thought writing a small article about the upcoming functionality and appearance of Phar in php5.3 might be a nice thing. So I did this at http://geekmonkey.org/articles/PHP_Archives - hope to save others some time when working with Phar.