Skip to content

pharmaker is a quick php script to build a phar file out of a directory with default scripts for web and cli

Notifications You must be signed in to change notification settings

masnun/pharmaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHAR MAKER

Simple PHAR build tool to convert a directory into a PHAR archive

Basic Concepts

Source Directory: The directory that contains the source php files.
PHAR Name: The name which identifies the Phar. The name is used to generate the phar archive as well as to refer to the archive in phar:// steam contexts.
CLI Script: The script which is executed when the archive is run from the command line. index.php is assumed if not provided.
Web Script: The script which is by default executed in the web environment. Defaults to CLI script value if not provided with.

Building Basics

./makephar <source dir> <phar name> [<cli script> <web script>]

Example: The following command will create a phar archive named mphar.phar with cli.php as cli script and web.php as the web script

./makephar src mphar.phar cli.php web.php

==========: STARTING PHAR BUILD PROCESS :==========
Source Directory: src
PHAR Name: mphar.phar
CLI Script: cli.php
Web Script: web.php
DONE: Built mphar.phar

Checkout the "src" directory for sample cli and web script

About

pharmaker is a quick php script to build a phar file out of a directory with default scripts for web and cli

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages