Phar packages generating with Phing. This task require PECL's Phar extension to be installed on your system. Phar is built-in in PHP from 5.3 version.
Table C.83: Attributes
Name | Type | Description | Default | Required |
---|---|---|---|---|
basedir | String | Base directory, which will be deleted from each included file (from
path). Paths with deleted basedir part are local
paths in package. | n/a | Yes |
destfile | String | Destination (output) file. Will be recreated, if exists! | n/a | Yes |
compression | String | Compression type (gzip, bzip2, none) to apply to the packed files. | none | No |
webstub | String | Relative path within the phar package to run, if accessed through a web browser. | n/a | No |
clistub | String | Relative path within the phar package to run, if accessed on the command line. | n/a | No |
stub | String | A path to a php file that contains a custom stub | n/a | No |
alias | String | An alias to assign to the phar package | n/a | No |
signature | String | Signature algorithm (md5, sha1, sha256, sha512), used for this package. | sha1 | No |
key | String | The private key to sign the phar package with (PEM or PKCS#12 encoded) | n/a | No |
keyPassword | String | The password to use for the private key | n/a | No |
Sample build command:
<pharpackage destfile="./build/package.phar" basedir="./"> <fileset dir="./classes"> <include name="**/**" /> </fileset> <metadata> <element name="version" value="1.0" /> <element name="authors"> <element name="John Doe"> <element name="e-mail" value="[email protected]" /> </element> </element> </metadata> </pharpackage>
metadata