Download the PHP package khalyomede/command-builder without Composer

On this page you can find all versions of the php package khalyomede/command-builder. 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 command-builder

command-builder

A PHP class to build executable with using fluent API.

Summary

About

I need to have a fluent way to call my executable. I did not found any other command builder providing such interface that was updated recently or provide a large test coverage.

Features

Installation

Install the package using Composer:

Examples

1. Create a simple command

In this example, we will just pass a command name, without arguments/options/flags.

2. Add an argument

In this example, we will add an argument to our command.

3. Add a flag

In this example, we will add a "long" flag to the command.

And this is how to add a "short" flag.

4. Add an option

You can add options to your command.

If your option contains spaces, it will automatically be escaped using double quotes.

And if your option contains spaces and doubles quotes, they will also be escaped.

You can also use "short" option.

5. Configure the standard

You can specify the standard used for the option. By default, it is set to "GNU".

You can also use constants if you prefer

6. Get the number of arguments

You can know how many arguments were added to the command.

7. Get the number of flags

You can know the number of flags added to your command.

8. Get the number of options

You can know the number of options added to your command.

9. Check if a flag has been added

You can know if a flag has been added already.

10. Check if an option has been added

You can know if an option has been added or not.

Compatibility table

This is the compatibility for this version only. To check the compatibility with other version of this package, please browse the version of your choice.

PHP Version Compatibility
8.1.* ✔️
8.0.* ✔️
7.4.* ✔️

Tests


All versions of command-builder with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.0
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 khalyomede/command-builder contains the following files

Loading the files please wait ....