Download the PHP package aliengen/pachyderm without Composer

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

Pachyderm - A Micro PHP Framework for APIs

Pachyderm is a lightweight PHP framework designed for building APIs with ease. It provides a simple and flexible way to manage routes, middleware, and HTTP requests.

Table of Contents

Introduction

Motivation

Pachyderm began as an internal training project at AlienGen, aimed at deepening our understanding of framework fundamentals and showcasing PHP's capabilities. As we developed numerous microservices, we recognized the need for a more robust solution than single-file scripts for main endpoints. Pachyderm emerged as a micro framework designed to be both simple and user-friendly, offering a lightweight alternative to larger frameworks like Laravel or Symfony.

We adhere to the KISS (Keep It Simple, Stupid) principle, ensuring our code remains straightforward and comprehensible. The framework's components are extensible, allowing for customization to meet specific needs. By minimizing external dependencies, Pachyderm remains compact and tailored.

Our development approach aligns with the 12-factor app principles, ensuring the framework is built to support these best practices.

Goals

Features

Getting Started

Installation

To install Pachyderm, use Composer:

Usage

Simple Example

Setting Up a Controller

To create a controller, you need to set up a dispatcher and register your middleware and routes.

Middleware

Middleware in Pachyderm allows you to process requests and responses. You can register global middleware or specific middleware for individual routes.

Registering Global Middleware

Example of registering global middleware:

Adding and Removing Middleware for Specific Routes

You can add middleware that should only be applied to specific routes, or remove global middleware from specific routes.

Example of adding and removing middleware for a route:

Routes

Pachyderm supports various HTTP methods such as GET, POST, PUT, DELETE, etc. You can define routes and their corresponding handlers.

Supported HTTP Methods

Services

Pachyderm provides a simple service container for managing service instances. You can register services as closures and retrieve them by name.

Registering a Service

To register a service, use the Service::set method. For example, to register the Db class as a service:

Using a Registered Service

To retrieve and use a registered service, use the Service::get method. For example, to use the Db service:

Direct Instantiation of Db

If you prefer to create a new instance of the Db class directly, you can do so as follows:

This approach allows you to have multiple instances of the Db class with different configurations if needed.

Exception Handling

Pachyderm provides a way to handle exceptions that occur during the execution of your application using the ExceptionHandlerMiddleware. This middleware is designed to catch exceptions of type AbstractHTTPException and return a structured response.

Using ExceptionHandlerMiddleware

To use the ExceptionHandlerMiddleware, you need to register it with your dispatcher. This middleware will catch any exceptions that occur during the request processing and handle them appropriately.

Here's an example of how to register and use the ExceptionHandlerMiddleware:

Existing Exceptions

The following exceptions implement the AbstractHTTPException and can be used to handle specific HTTP error scenarios:

These exceptions can be thrown within your route handlers to trigger the ExceptionHandlerMiddleware and return appropriate HTTP error responses.

Additional Information

For more detailed documentation, please refer to the source code and comments within the files.

License

Pachyderm is licensed under the MIT License. See the LICENSE file for more details.


All versions of pachyderm with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
psr/log Version ^1.0@dev
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 aliengen/pachyderm contains the following files

Loading the files please wait ....