Download the PHP package andygrn/aquarius without Composer

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

aquarius

A PHP application framework for Gemini capsules, including:

It should be reasonably familiar to anyone who's used a PHP web framework before.

See it in action at gemini://andygrn.co.uk/apps/aquarius

Installation

Via Composer: composer require andygrn/aquarius

Or download the file and require 'aquarius.php';.

Requires PHP 7.3 or above.

Apps and Handlers

A single aquarius App has one or more Handlers.

A handler is a path regex and a stack of functions. The app will run the stack of the first handler whose regex matches the request path. A handler's function stack must return a Response, which will be sent to the client.

Functions are added to a handler's stack with the butFirst method. The last function added to the stack runs first. Stack functions should pass to the next function down the stack with return $this->next($request, $response);, but they may choose to return $response; directly to bypass the rest of the stack.

Handler functions can be any valid callable.

CGI variables

To do anything useful, aquarius requires at least PATH_INFO and QUERY_STRING to be defined by the CGI host. REMOTE_USER too, if you plan to use Request::getRemoteUser().

To enable the client certificate session behaviour, aquarius also requires TLS_CLIENT_HASH. I'm not sure how standard it is, but Jetforce, Molly Brown, and GLV-1.12556 appear to support it.

API

Request

Request::getPath(): string Get the current PATH_INFO, normalised with leading slash and without trailing slash.

Request::getQuery(): string Get the current QUERY_STRING, URL-decoded (using rawurldecode()).

Request::getRemoteUser(): string Get the current REMOTE_USER (probably a client certificate Common Name).

Response

Response::setHeader(int $status, string $meta): void Set the header line of the response. Default response ($status, $meta) is (Response::STATUS_SUCCESS, 'text/gemini'), so you may not need to call this.

Response::getStatus(): int Get the response status code.

Response::getMeta(): string Get the response meta string.

Response::setBody(string $body): void Set the entire response body.

Response::appendBody(string $body): void Append to the response body.

Response::getBody(): string Get the response body.

Handler

Handler::next(Request $request, Response $response): Response Call the next function in this handler's stack.

Handler::butFirst(callable $callable): self Add a function to this handler's stack. The last one added will be the first called. Returns itself so calls can be chained.

Handler::getPathParameters(): array<mixed> Get the path parameters captured from this handler's regex pattern.

App

App::addHandler(string $path_regex, callable $callable): Handler Create a new Handler to run on $path_regex, with $callable as the first function in its stack.

App::run(): void Resolve the current path to a handler and run it (or serve 51 response if no handler matches).

Example apps


All versions of aquarius with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3.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 andygrn/aquarius contains the following files

Loading the files please wait ....