Download the PHP package cubadevops/flexi without Composer

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

Flexi Framework

Flexi is a modular PHP framework designed to facilitate the development of scalable and maintainable applications. It leverages Dependency Injection (DI), a flexible routing system, CQRS and an event-driven architecture.

Table of Contents

Features

Structure

Installation

You can install Flexi Framework using Composer:

This command creates a minimal ready boilerplate application in the my-app directory.

Steps after install

To get started with Flexi Framework, ensure you:

After setup, browse to the URL of your application to see the welcome page. If you use the default configuration with Docker, you can access the application at http://localhost:8080.

Configuration

Configuration for Flexi is managed through JSON files. These files define services, routes, events, queries, and commands used within your application.

Services

Services are defined in the services.json file located in the Config directory. This file outlines how each service should be instantiated, either directly or via factory methods.

Example

Note:

Routes

Routes are defined in the routes.json file. Each route specifies the HTTP method, path, and the controller that should handle the request.

Example

Note:

Events and Listeners

Events and listeners are defined in the listeners.json file. This file maps events to their corresponding listeners.

Example

Note:

Queries

Queries are defined in the queries.json file. Each query handler is mapped to a specific DTO and an optional CLI alias.

Example

Note:

Commands

Commands are defined similarly to queries in the commands.json file.

Example

Note:

Usage

Router

The Router class is responsible for managing routes and dispatching requests to the appropriate controllers.

Example Usage

Event System

The event system in Flexi is based on the EventBus pattern. Events are dispatched to listeners which can handle them accordingly.

Example

CQRS

Flexi implements the CQRS pattern with separate handling for commands and queries.

Command Example

Query Example

Controllers and Response

The response is a PSR-7 response object that can be returned from a controller or middleware. Controllers that extend the CubaDevOps\Flexi\Infrastructure\Classes\HttpHandler have an easy way to build responses using the createResponse method. If you you don't extend the HttpHandler you can use a factory that implements Psr\Http\Message\ResponseFactoryInterface interface to build the response. Flexi use the GuzzleHttp\Psr7\HttpFactory as default factory.

Example

Middlewares

Middlewares are classes that can be executed before the controller. They can modify the request, response or stop the execution chain. Middlewares should implement the Psr\Http\Server\MiddlewareInterface interface.

Example

Documentation

The documentation is available online at https://flexi.cubadevops.com (Under construction and not yet available).

Contributing

Contributions are welcome! Please submit a pull request or open an issue to discuss any changes you would like to make.

License

Flexi is open-source software licensed under the MIT license.


All versions of flexi with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-json Version *
cubadevops/upgrader Version ^1.6
guzzlehttp/guzzle Version ^7.7
psr/cache Version ^1.0
psr/container Version ^2.0
psr/event-dispatcher Version ^1.0
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^2.0
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.0
psr/link Version ^1.0
psr/log Version ^1.1
psr/simple-cache Version ^1.0
symfony/error-handler Version ^5.4
vlucas/phpdotenv Version ^5.5
ext-pcntl Version *
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 cubadevops/flexi contains the following files

Loading the files please wait ....