Download the PHP package patinthehat/glacier without Composer

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

Glacier


A lightweight framework for quickly putting together PHP CLI scripts and applications.


Install with composer


Events

Glacier allows you to write event-driven applications quite easily using Events and EventListeners.

Custom events extend the Event class, and names are generated automatically. Event names are generated by inserting a period before every capital letter (except the first) and making everything lowercase. For example, "MyEvent123" would trigger the "my.event123" event.

An event can be defined as simply as:

Properties, etc. can be added as required.

To trigger an event, call event():

You may also send a payload along with the event by passing a second, optional parameter:

Event Listeners

Events are handled by event listeners, which are automatically registered by the application. No action needs to be taken other than defining an EventListener or MultipleEventListener class. To disable this behavior, set the property $autoRegister to false:

An event listener that handles events 'my.event1' and 'my.event2' can be defined as such:

To listen for ALL events, the event name should be defined as '*':


Commands

Glacier allows support for multiple commands within the same application. To create a command, extend the Command class:

By default, all commands are automatically registered. To disable this behavior, set the static property $autoRegister to false:

If autoregistration is disabled, register it before calling $app->run():


Default Commands


Command-Line Arguments

Glacier will accept all command-line flags by default. To accept a flag with a value, you must call the defineOption() method on the arguments() method. Once done defining options, you must call parse().

Once defined, even if the short flag is provided, its value can be accessed by calling setting($name), such as setting('test'), even if -t 55 was passed on the command line.

To define command-line options, use the following format:

such as:

In full, to define a command-line option:

This must be done before a call to $app->run().

Any of these settings defined here could later be referenced, for example, as setting('count') or setting('all').

If you simply wish to be able to handle flags with no values, you do not need to call defineOption(). To access, simply reference app()->arguments()->hasOption('myflag'):

Configuration Files


A Basic Application

Execution: php myapp.php -t 55 or php myapp.php --test=123


A Simple Glacier Application

Execution: php myapp.php then php myapp.php --goodbye


All versions of glacier with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.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 patinthehat/glacier contains the following files

Loading the files please wait ....