Download the PHP package ffperera/cubo without Composer

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

Cubo

Cubo is a lightweight PHP framework designed for building web applications with simplicity and flexibility.

It provides a minimalist but solid foundation for the development process, with zero hidden magic features, and avoiding overengineered techniques, while ensuring a clean and modular architecture.

NOTE: While Cubo can certainly be used in real-world production projects, there are more established frameworks with strong community support like Symfony and Laravel. We recommend considering these alternatives for enterprise-level applications requiring extensive ecosystem support.

Features

Requirements

Installation

Install using Composer:

Usage

Think of Cubo as a tool designed to manage request routing and the tasks and services linked to those routes.

As we'll explore later, Cubo operates through executing sequences of tasks, encapsulated as Action objects.

A Cubo-based project can be organized in countless ways. The framework is intentionally project-structure agnostic. You’re free to adopt whatever project layout best suits your needs, and you can use external components, packages, or services as required.

However, it’s important to note that Cubo’s core philosophy centers on building ultra-lightweight applications.

Project structure

A typical project using Cubo looks like this:

Entry point

The app entry point is /root/index.php

This file is located in the public directory (root folder) of the HTTP server.

Public resources and assets like images and CSS files should be placed in the /root directory.

All other folders reside outside the root directory and cannot be accessed directly from external sources.

Sections

Each section can maintain its own:

These sections can be converted into independent services (eg. micro services) with minimal refactoring.

Action queues

An Action is a class that performs specific tasks.

Developers can:

There are three action queues:

Action queues are dynamic ones.

Example: If a request fails, abort the current action and insert a fallback action to handle the failure.

Action

Example of one Action class.

Main controller

The Controller object acts as Cubo's orchestration center. It is like the kernel component of other frameworks.

It handles:

Once configured, your application primarily operates through the Controller::run() method call.

Routing

The routing file contains an array defining:

Example:

Rendering Views

The Render class is responsible for rendering views and layouts.

We can render directly to the client or render to a Response object depending on our needs.

Here's an example of how to use it:

Render can use PHP templates:

In the View object, you can configure a single layout (e.g., an HTML skeleton) and include multiple templates and variables as needed.

Templates can be invoked from the layout or other templates using the Render::block() method.

Data injected into the View by Actions can be accessed using the View::get() method.

Additionally, you can create a custom Render subclass to integrate third-party template engines seamlessly.

In this demo project, we use the Latte template engine and PHP templates working together.

HTTP Responses

The Response class allows you to manage HTTP headers, status codes, and redirections.

Contributing

Contributions are welcome!

Please fork the repository, create a feature branch, and submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.


All versions of cubo with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
psr/log Version ^3.0
psr/http-message Version ^2.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 ffperera/cubo contains the following files

Loading the files please wait ....