Skip to content

Latest commit

 

History

History
121 lines (85 loc) · 4.15 KB

README.md

File metadata and controls

121 lines (85 loc) · 4.15 KB

Springy

A micro framework for smart PHP developers.

--

Table of content

About

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.

Instalation Guide

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.

Prerequisites

First steps

  • 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.

Configuration

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.

Configuration files

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.

Models

Model is part of MVC architecture of the framework. They are objects representing business data, rules and logic.

Read more

Views

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.

Read mode

Controllers

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.

Read more

Library

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.