A micro framework for smart PHP developers.
--
The Springy is designed to be a framework for developing web applications in PHP MVC architecture, lightweight, easy to learn, feature rich, adaptable and quick execution.
We will consider that you have already configured web server to answer the request at the address of your project and explain just how to take the first steps to create the first page.
If you do not use the Apache HTTP Server or your web server does not understand the .htaccess configuration file, like NGINX Plus, check what settings are required to reproduce the same effect.
- Must have Composer Dependency Manager for PHP installed;
- Must have a web server and PHP installed and configured to your project;
- Download and unzip the framework release package into a temporary directory;
- Copy the content of www sub-directory to the document root of your project;
- Edit the composer.json file and choice the libraries you will use:
- Run Composer to download and install all dependencies;
- Edit the configuration files;
- Create your controllers, views and models.
The consts
file defines the application name, version and project code name,
as well as application directory paths.
The .env
file defines your application's configuration entries. This file
should not be added to your repository. Create it from the existing
.env.example
file in the project root.
All other configuration stays in files inside the folder defined by CONFIG_DIR
constant defined in consts
file.
The Configuration
library class search for files with ".php"
sufix inside
environment subdirectories. If a configuration file with same target name and
".php"
exists inside configuration folder, it will be loaded before the
environment configuration.
All *.php must returns an array with key pair.
You can sets configuration for specific hosts by defining a file named
{conf_segment}-{host}.php
. The key pairs array returned by this files will
overwrite all other configurations.
The Springy Framework uses some pre-defined configuration files like db, mail, soap, system, template and uri.
Any other configuration file can be used by your application.
Model is part of MVC architecture of the framework. They are objects representing business data, rules and logic.
Views are part of MVC architecture of the framework. They are code responsible for presenting data to end users, usually files containing HTML code and special codes parsed by a template engine.
Controller is part of MVC architecture of the framework. All actions is you application is started by a controller class. They are responsible for processing requests and generating responses.
The framework library is a set of classes used by itself and what the application can use too.
You can see it's documentation here.