Annotation of embedaddon/php/ext/phar/phar.1.in, revision 1.1.1.1
1.1 misho 1: .TH PHAR 1 "2013" "The PHP Group" "User Commands"
2: .SH NAME
3: phar, phar.phar \- PHAR (PHP archive) command line tool
4: .SH SYNOPSIS
5: .B phar
6: <command> [options] ...
7: .LP
8: .SH DESCRIPTION
9: The \fBPHAR\fP file format provides a way to put entire PHP applications into a single
10: file called a "phar" (PHP Archive) for easy distribution and installation.
11: .P
12: With the \fBphar\fP command you can create, update or extract PHP archives.
13: .P
14: Commands:
15: add compress delete extract help help-list info list meta-del
16: meta-get meta-set pack sign stub-get stub-set tree version
17:
18: .SH add command
19: Add entries to a PHAR package.
20: .P
21: Required arguments:
22: .TP 15
23: .PD
24: .B -f \fIfile\fP
25: Specifies the phar \fIfile\fP to work on.
26: .TP
27: .PD
28: .B ...
29: Any number of input files and directories. If -i is in
30: use then ONLY files and matching the given regular
31: expression are being packed. If -x is given then files
32: matching that regular expression are NOT being packed.
33: .P
34: Optional arguments:
35: .TP 15
36: .PD
37: .B \-a \fIalias\fP
38: Provide an \fIalias\fP name for the phar file.
39: .TP
40: .PD
41: .B \-c \fIalgo\fP
42: Compression algorithm (see
43: .SM
44: .B COMPRESSION
45: )
46: .TP
47: .PD
48: .B \-i \fIregex\fP
49: Specifies a regular expression for input files.
50: .TP
51: .PD
52: .B \-l \fIlevel\fP
53: Number of preceding subdirectories to strip from file entries
54: .TP
55: .PD
56: .B \-x \fIregex\fP
57: Regular expression for input files to exclude.
58:
59: .SH compress command
60: Compress or uncompress all files or a selected entry.
61: .P
62: Required arguments:
63: .TP 15
64: .PD
65: .B \-c \fIalgo\fP
66: Compression algorithm (see
67: .SM
68: .B COMPRESSION
69: )
70: .TP
71: .PD
72: .B -f \fIfile\fP
73: Specifies the phar \fIfile\fP to work on.
74: .P
75: Optional arguments:
76: .TP 15
77: .PD
78: .B -e \fIentry\fP
79: Name of \fIentry\fP to work on (must include PHAR internal
80: directory name if any).
81:
82: .SH delete command
83: Delete entry from a PHAR archive
84: .P
85: Required arguments:
86: .TP 15
87: .PD
88: .B \-e \fIentry\fP
89: Name of \fIentry\fP to work on (must include PHAR internal
90: directory name if any).
91: .TP
92: .PD
93: .B -f \fIfile\fP
94: Specifies the phar \fIfile\fP to work on.
95:
96: .SH extract command
97: Extract a PHAR package to a directory.
98: .P
99: Required arguments:
100: .TP 15
101: .PD
102: .B -f \fIfile\fP
103: Specifies the phar \fIfile\fP to work on.
104: .P
105: Optional arguments:
106: .TP 15
107: .PD
108: .B -i \fIregex\fP
109: Specifies a regular expression for input files.
110: .TP
111: .PD
112: .B -x \fIregex\fP
113: Regular expression for input files to exclude.
114: .TP
115: .PD
116: .B ...
117: Directory to extract to (defaults to '.').
118:
119:
120: .SH help command
121: This help or help for a selected command.
122: .P
123: Optional arguments:
124: .TP 15
125: .PD
126: .B ...
127: Optional command to retrieve help for.
128:
129: .SH help-list command
130: Lists available commands.
131:
132: .SH info command
133: Get information about a PHAR package.
134: .P
135: By using -k it is possible to return a single value.
136: .P
137: Required arguments:
138: .TP 15
139: .PD
140: .B -f \fIfile\fP
141: Specifies the phar \fIfile\fP to work on.
142: .P
143: Optional arguments:
144: .TP 15
145: .PD
146: .B -k \fIindex\fP
147: Subscription \fIindex\fP to work on.
148:
149: .SH list command
150: List contents of a PHAR archive.
151: .P
152: Required arguments:
153: .TP 15
154: .PD
155: .B -f \fIfile\fP
156: Specifies the phar \fIfile\fP to work on.
157: .P
158: Optional arguments:
159: .TP 15
160: .PD
161: .B -i \fIregex\fP
162: Specifies a regular expression for input files.
163: .TP
164: .PD
165: .B -x \fIregex\fP
166: Regular expression for input files to exclude.
167:
168:
169: .SH meta-del command
170: Delete meta information of a PHAR entry or a PHAR package.
171: .P
172: If -k is given then the metadata is expected to be an array and the
173: given index is being deleted.
174: .P
175: If something was deleted the return value is 0 otherwise it is 1.
176: .P
177: Required arguments:
178: .TP 15
179: .PD
180: .B -f \fIfile\fP
181: Specifies the phar \fIfile\fP to work on.
182: .P
183: Optional arguments:
184: .TP 15
185: .PD
186: .B -e \fIentry\fP
187: Name of \fIentry\fP to work on (must include PHAR internal
188: directory name if any).
189: .TP
190: .PD
191: .B -k \fIindex\fP
192: Subscription \fIindex\fP to work on.
193:
194: .SH meta-get command
195: Get meta information of a PHAR entry or a PHAR package in serialized from. If
196: no output file is specified for meta data then stdout is being used.
197: You can also specify a particular index using -k. In that case the
198: metadata is expected to be an array and the value of the given index
199: is returned using echo rather than using serialize. If that index does
200: not exist or no meta data is present then the return value is 1.
201: .P
202: Required arguments:
203: .TP 15
204: .PD
205: .B -f \fIfile\fP
206: Specifies the phar \fIfile\fP to work on.
207: .P
208: Optional arguments:
209: .TP 15
210: .PD
211: .B -e \fIentry\fP
212: Name of \fIentry\fP to work on (must include PHAR internal
213: directory name if any).
214: .TP
215: .PD
216: .B -k \fIindex\fP
217: Subscription \fIindex\fP to work on.
218:
219: .SH meta-set command
220: Set meta data of a PHAR entry or a PHAR package using serialized input. If no
221: input file is specified for meta data then stdin is being used. You can
222: also specify a particular index using -k. In that case the metadata is
223: expected to be an array and the value of the given index is being set.
224: If the metadata is not present or empty a new array will be created.
225: If the metadata is present and a flat value then the return value is
226: 1. Also using -k the input is been taken directly rather then being
227: serialized.
228: .P
229: Required arguments:
230: .TP 15
231: .PD
232: .B -f \fIfile\fP
233: Specifies the phar \fIfile\fP to work on.
234: .TP
235: .PD
236: .B -m \fImeta\fP
237: Meta data to store with entry (serialized php data).
238: .P
239: Optional arguments:
240: .TP 15
241: .PD
242: .B -e \fIentry\fP
243: Name of \fIentry\fP to work on (must include PHAR internal
244: directory name if any).
245: .TP
246: .PD
247: .B -k \fIindex\fP
248: Subscription \fIindex\fP to work on.
249:
250: .SH pack command
251: Pack files into a PHAR archive.
252: .P
253: When using -s <stub>, then the stub file is being excluded from the
254: list of input files/dirs.To create an archive that contains PEAR class
255: PHP_Archive then point -p argument to PHP/Archive.php.
256: .P
257: Required arguments:
258: .TP 15
259: .PD
260: .B -f \fIfile\fP
261: Specifies the phar \fIfile\fP to work on.
262: .TP
263: .PD
264: .B ...
265: Any number of input files and directories. If -i is in
266: use then ONLY files and matching the given regular
267: expression are being packed. If -x is given then files
268: matching that regular expression are NOT being packed.
269: .P
270: Optional arguments:
271: .TP 15
272: .PD
273: .B \-a \fIalias\fP
274: Provide an \fIalias\fP name for the phar file.
275: .TP
276: .PD
277: .B \-b \fIbang\fP
278: Hash-bang line to start the archive (e.g. #!/usr/bin/php).
279: The hash mark itself '#!' and the newline character are optional.
280: .TP
281: .PD
282: .B \-c \fIalgo\fP
283: Compression algorithm (see
284: .SM
285: .B COMPRESSION
286: )
287: .TP
288: .PD
289: .B \-h \fIhash\fP
290: Selects the \fIhash\fP algorithm (see
291: .SM
292: .B HASH
293: )
294: .TP
295: .PD
296: .B \-i \fIregex\fP
297: Specifies a regular expression for input files.
298: .TP
299: .PD
300: .B \-l \fIlevel\fP
301: Number of preceding subdirectories to strip from file entries
302: .TP
303: .PD
304: .B \-p \fIloader\fP
305: Location of PHP_Archive class file (pear list-files
306: PHP_Archive).You can use '0' or '1' to locate it
307: automatically using the mentioned pear command. When
308: using '0' the command does not error out when the class
309: file cannot be located. This switch also adds some code
310: around the stub so that class PHP_Archive gets
311: registered as phar:// stream wrapper if necessary. And
312: finally this switch will add the file phar.inc from
313: this package and load it to ensure class Phar is
314: present.
315: .TP
316: .PD
317: .B \-s \fIstub\fP
318: Select the \fIstub\fP file.
319: .TP
320: .PD
321: .B \-x \fIregex\fP
322: Regular expression for input files to exclude.
323: .TP
324: .PD
325: .B \-y \fIkey\fP
326: Private \fIkey\fP for OpenSSL signing.
327:
328: .SH sign command
329: Set signature hash algorithm.
330: .P
331: Required arguments:
332: .TP 15
333: .PD
334: .B -f \fIfile\fP
335: Specifies the phar \fIfile\fP to work on.
336: .TP
337: .PD
338: .B \-h \fIhash\fP
339: Selects the \fIhash\fP algorithm (see
340: .SM
341: .B HASH
342: )
343: .P
344: Optional arguments:
345: .TP 15
346: .PD
347: .B \-y \fIkey\fP
348: Private \fIkey\fP for OpenSSL signing.
349:
350: .SH stub-get command
351: Get the stub of a PHAR file. If no output file is specified as stub then stdout
352: is being used.
353: .P
354: Required arguments:
355: .TP 15
356: .PD
357: .B -f \fIfile\fP
358: Specifies the phar \fIfile\fP to work on.
359: .P
360: Optional arguments:
361: .TP 15
362: .PD
363: .B \-s \fIstub\fP
364: Select the \fIstub\fP file.
365:
366: .SH stub-set command
367: Set the stub of a PHAR file. If no input file is specified as stub then stdin
368: is being used.
369: .P
370: Required arguments:
371: .TP 15
372: .PD
373: .B -f \fIfile\fP
374: Specifies the phar \fIfile\fP to work on.
375: .P
376: Optional arguments:
377: .TP 15
378: .PD
379: .B \-b \fIbang\fP
380: Hash-bang line to start the archive (e.g. #!/usr/bin/php).
381: The hash mark itself '#!' and the newline character are optional.
382: .TP
383: .PD
384: .B \-p \fIloader\fP
385: Location of PHP_Archive class file (pear list-files
386: PHP_Archive).You can use '0' or '1' to locate it
387: automatically using the mentioned pear command. When
388: using '0' the command does not error out when the class
389: file cannot be located. This switch also adds some code
390: around the stub so that class PHP_Archive gets
391: registered as phar:// stream wrapper if necessary. And
392: finally this switch will add the file phar.inc from
393: this package and load it to ensure class Phar is
394: present.
395: .TP
396: .PD
397: .B \-s \fIstub\fP
398: Select the \fIstub\fP file.
399:
400:
401: .SH tree command
402: Get a directory tree for a PHAR archive.
403: .P
404: Required arguments:
405: .TP 15
406: .PD
407: .B -f \fIfile\fP
408: Specifies the phar \fIfile\fP to work on.
409: .P
410: Optional arguments:
411: .TP 15
412: .PD
413: .B \-i \fIregex\fP
414: Specifies a regular expression for input files.
415: .TP
416: .PD
417: .B \-x \fIregex\fP
418: Regular expression for input files to exclude.
419:
420: .SH version command
421: Get information about the PHAR environment and the tool version.
422:
423:
424: .SH COMPRESSION
425: Algorithms:
426: .TP 15
427: .PD
428: .B 0
429: No compression
430: .TP
431: .PD
432: .B none
433: No compression
434: .TP
435: .PD
436: .B auto
437: Automatically select compression algorithm
438: .TP
439: .PD
440: .B gz
441: GZip compression
442: .TP
443: .PD
444: .B gzip
445: GZip compression
446: .TP
447: .PD
448: .B bz2
449: BZip2 compression
450: .TP
451: .PD
452: .B bzip2
453: BZip2 compression
454:
455: .SH HASH
456: Algorithms:
457: .TP 15
458: .PD
459: .TP
460: .PD
461: .B md5
462: MD5
463: .TP
464: .PD
465: .B sha1
466: SHA1
467: .TP
468: .PD
469: .B sha256
470: SHA256
471: .TP
472: .PD
473: .B sha512
474: SHA512
475: .TP
476: .PD
477: .B openssl
478: OpenSSL
479:
480: .SH SEE ALSO
481: For a more or less complete description of PHAR look here:
482: .PD 0
483: .P
484: .B http://php.net/phar
485: .PD 1
486: .P
487: .SH BUGS
488: You can view the list of known bugs or report any new bug you
489: found at:
490: .PD 0
491: .P
492: .B http://bugs.php.net
493: .PD 1
494: .SH AUTHORS
495: The PHP Group: Thies C. Arntzen, Stig Bakken, Andi Gutmans, Rasmus Lerdorf, Sam Ruby, Sascha Schumann, Zeev Suraski, Jim Winstead, Andrei Zmievski.
496: .P
497: Work for the PHP archive was done by Gregory Beaver, Marcus Boerger.
498: .P
499: A List of active developers can be found here:
500: .PD 0
501: .P
502: .B http://www.php.net/credits.php
503: .PD 1
504: .P
505: And last but not least PHP was developed with the help of a huge amount of
506: contributors all around the world.
507: .SH VERSION INFORMATION
508: This manpage describes \fBphar\fP, version @PHP_VERSION@.
509: .SH COPYRIGHT
510: Copyright \(co 1997\-2013 The PHP Group
511: .LP
512: This source file is subject to version 3.01 of the PHP license,
513: that is bundled with this package in the file LICENSE, and is
514: available through the world-wide-web at the following url:
515: .PD 0
516: .P
517: .B http://www.php.net/license/3_01.txt
518: .PD 1
519: .P
520: If you did not receive a copy of the PHP license and are unable to
521: obtain it through the world-wide-web, please send a note to
522: .B license@php.net
523: so we can mail you a copy immediately.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>