Download the PHP package clip/clip without Composer

On this page you can find all versions of the php package clip/clip. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package clip

Overview

Clip is a simple framework for making CLI (console) commands in PHP.

You can run a command by typing the following:

$ clip <command-name> [parameters...]

Output from the command will be displayed in the console.

New Commands

Make a new command by adding a file to the 'commands' directory. The file name should exactly match the class name. Clip provides an interface that must be implemented for any command.

This Command interface has two methods that must be defined:

The 'run' method which actually executes the command:

The 'help' method which outlines what this command actually does:

Configuration

Clip provides a very simple way to create and access config files. Add a new file to the 'config' directory. In that file you will return an associative array of configuration parameters.

To access these parameters you would use the following command:

You can specify additional configuration keys as parameters to the call to get an array back for each key specified.

You can also not specify any parameters to get the entire configuration array back.

Styling Output

Clip lets you style your output if you so choose. To do so you will need to use the render function under the clip namespace.

Check out the styles.php config file for the different options. Use the square bracket syntax with the key of the style in it. Feel free to add any additional styles that are not currently set in the config file.

Command nesting

If you would like to call another Command inside of a Command you can do that with Clip. Access the current Clip instance using the 'instance' method. Then call the 'fire' method on the Clip instance specifying what the other Command is and what parameters to use.

This is useful if you have a separate Command that needs to be executed immediately after another Command finishes or if a Command relies on some parameters from another Command. I would advise that if you aren't careful this type of execution stack can get messy with too many Commands called consecutively.

Help

You can see what commands are available by typing:

$ clip

To see help text for a command you would type:

$ clip help <command-name>

Installation

Copy the files where ever you need them. All the files with the exception of commands/Test.php are required so make sure you have them all.

Also make sure the clip command file (./clip) has execute permissions.

License

Clip is MIT licensed


All versions of clip with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package clip/clip contains the following files

Loading the files please wait ....