.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PHPABTPL 1" .TH PHPABTPL 1 "2022-06-22" "1.43~bpo11+1" "pkg-php-tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" phpabtpl \- generate phpab templates with dependency autoloading .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBphpabtpl\fR [\fI\s-1OPTION\s0\fR...] [\fIcomposer.json\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBphpabtpl\fR is a command-line tool used to generate \fBphpab\fR autoloader templates. In addition to the regular autoloading of the package's own class files, the generated template will also include automatic loading of dependencies and statically loaded files, based on the specification read from a \fIcomposer.json\fR file. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-h, \-\-help\fR" 4 .IX Item "-h, --help" Print a help message and exit. .IP "\fB\-\-basedir\fR \fIdirectory\fR" 4 .IX Item "--basedir directory" Set the base directory for \*(L"files\*(R" autoloading. .Sp This option can be used to adjust the paths for statically loaded files (Composer's \*(L"files\*(R" section), to treat them as relative to the specified directory rather than to the source's root. This would typical be used for packages where the actual source files are kept in a sub-directory (commonly \&\*(L"src\*(R"). .Sp Limitation: This directory must be somewhere above the to-be-loaded files in the file hierarchy. It will not traverse upwards. .IP "\fB\-\-require\fR \fIcomposer_package\fR" 4 .IX Item "--require composer_package" Adds an additional required dependency to be loaded. .Sp \&\fIcomposer_package\fR is the name of a Composer package, e.g. \*(L"vendor/project\*(R". It is treated as an extra entry in the composer.json \*(L"require\*(R" section. .Sp This option can be repeated to add multiple dependencies. .IP "\fB\-\-suggest\fR \fIcomposer_package\fR" 4 .IX Item "--suggest composer_package" Adds an additional suggested dependency to be (optionally) loaded. .Sp \&\fIcomposer_package\fR is the name of a Composer package, e.g. \*(L"vendor/project\*(R". It is treated as an extra entry in the composer.json \*(L"suggest\*(R" section. .Sp This option can be repeated to add multiple dependencies. .IP "\fB\-\-require\-file\fR \fIfile\fR" 4 .IX Item "--require-file file" Adds an additional file to be loaded. .Sp The \fIfile\fR path will be adapted to \fB\-\-basedir\fR, if given. It is treated as an extra entry in the composer.json \*(L"autoload.files\*(R" section. .Sp This option can be repeated to add multiple files. .SH "EXAMPLES" .IX Header "EXAMPLES" .IP "Generate a template with dependency autoloading:" 4 .IX Item "Generate a template with dependency autoloading:" phpabtpl composer.json >autoload.php.tpl .ie n .IP "Generate a template for an autoloader to be placed in the ""src"" directory:" 4 .el .IP "Generate a template for an autoloader to be placed in the ``src'' directory:" 4 .IX Item "Generate a template for an autoloader to be placed in the src directory:" phpabtpl \-\-basedir src composer.json >autoload.php.tpl .IP "Generate a template with manually specified dependencies:" 4 .IX Item "Generate a template with manually specified dependencies:" phpabtpl \-\-require proj1/pack1 \-\-require\-file src/autoload.php .SH "FILES" .IX Header "FILES" .IP "\fIdebian/pkg\-php\-tools\-autoloaders\fR" 4 .IX Item "debian/pkg-php-tools-autoloaders" Autoloaders that are not correctly identified by \fBphpabtpl\fR by default can be manually specified in this file. .Sp The format is a set of lines, with each line having the following fields: .RS 4 .IP "\fIvendor_name\fR" 6 .IX Item "vendor_name" The Composer package's vendor name (e.g. \*(L"vendor\*(R" in \*(L"vendor/project\*(R"). .IP "\fIproject_name\fR" 6 .IX Item "project_name" The Composer package's project name (e.g. \*(L"project\*(R" in \*(L"vendor/project\*(R"). .IP "\fIautoloader_path\fR" 6 .IX Item "autoloader_path" The corresponding autoloader file (e.g. \*(L"Vendor/Project/autoload.php\*(R"). .RE .RS 4 .Sp It can be installed in \fB/usr/share/pkg\-php\-tools/autoloaders/\fR\fIpackage\fR. .RE