Download the PHP package gaetanroger/minimal-php-framework without Composer

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

Minimal PHP framwork

Build Status Coverage Status

Concept

General idea

This minimal framework is meant to be used for a Model & Manager PHP based application.

If your application is about cars, you could have the following classes and methods:

With the framework

This minimal framework defines two classes for you: AbstractModel and AbstractManager. Both predefine methods that every model and manager need, like Manager.find(int), Manager.findAll(), Model.getId(), Model.insert(), etc. (please find all defined methods in Methods list down below).

This framework makes data persistence easy by using properties and class names to match database table names. For example, if a model is named AwesomeCar the framework will look for a table named awesome_car.

How to install

This project is available as a Composer dependency. Please use the following command:

How to use

At the beginning of your application, please set the PDO connection in the model and manager like this:

This will allow the model to update and insert itself into the database, and the manager to find models (from an ID for example). Plus, all your models and manager will be able to easily access database.

Then simply make all your models and managers inherit from Gaetanroger\MinimalPhpFramework\AbstractModel and Gaetanroger\MinimalPhpFramework\AbstractManager. Be careful to follow naming conventions specified down below, as names are by default dynamically used by the framework.

Conventions to follow

Model

Valid model names with their table name:

Invalid model names:

Manager

Valid manager names with their model name:

Invalid manager names:

Properties and methods list

AbstractModel

AbstractManager

Changelog

Please take a look at CHANGELOG.MD

Please criticize

Please feel free to contact me here or by email if something bothers you or does not work as expected.


All versions of minimal-php-framework with dependencies

PHP Build Version
Package Version
Requires php Version >=7.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 gaetanroger/minimal-php-framework contains the following files

Loading the files please wait ....