Download the PHP package anax/response without Composer

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

Anax Response

Latest Stable Version Join the chat at https://gitter.im/mosbth/anax

Build Status CircleCI

Build Status Scrutinizer Code Quality Code Coverage

Maintainability Codacy Badge

Anax Response module to send HTTP responses.

The module is used to send a HTTP response from the Anax framework, including status code, headers, and body.

Table of content

Class, interface, trait

The following classes, interfaces and traits exists.

Class, interface, trait Description
Anax\Response\Response Wrapper class for response details and related.
Anax\Response\ResponseUtility Extends the Request class to be injectable with $id to enable easy to use redirect methods.

Exceptions

Module specific exceptions are thrown through Anax\Response\Exception.

Configuration file

There is no configuration file for this module.

DI service

The module is created as a framework service within $di. You can see the details in the configuration file config/di/response.php.

It can look like this.

  1. The object is created as a shared resource.
  2. DI is injected into the module, when using ResponseUtility.

The service is lazy loaded and not created until it is used.

General usage within the Anax framework

The response service is a mandatory service within the Anax framework and it is the first service used when handling a request to the framework.

Here is the general flow for receiving a request, mapping it to a route and returning a response. This is found in the frontcontroller htdocs/index.php of an Anax installation.

The request is used to get the request method and the route path, these are used by the router service to find a callback for the route. Each callback can then return a response which is sent through the response service.

Access as framework service

You can access the module as a framework service.

Create, init and use an object

This is how the object can be created. This is usually done within the framework as a sevice in $di.

The added benefit of using ResponseUtility is that this class is injected with DI and makes it easier to use the redirect methods for urls within the framework.

License

This software carries a MIT license. See LICENSE.txt for details.


All versions of response with dependencies

PHP Build Version
Package Version
Requires php Version ^7.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 anax/response contains the following files

Loading the files please wait ....