PHP Classes

File: documentation/en/README.md

Recommend this page to a friend!
  Classes of Fernando Val   Springy   documentation/en/README.md   Download  
File: documentation/en/README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Springy
Microframework for Web application development
Author: By
Last change: Implementing documentation for system.conf
Documenting the main configuration
Merge pull request #9 from fernandoval/development

v3.6.1
Date: 5 years ago
Size: 4,295 bytes
 

Contents

Class file image Download

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: * Choice between Smarty and Twig for template engine used as views; * Choice between PHPMailer and SendGrid for mailer system.
  • Run Composer to download and install all dependencies;
  • Edit the configuration files;
  • Create your controllers, views and models.

Configuration

The script sysconf.php is the general system configuration. Some configuration like application name and version, environment, application tree, charset and timezone. Reed this for mor details.

All configuration stays in files inside the folder defined by 'CONFIG_PATH' in the sysconf.php. Default: /conf folder.

Configuration files

The Configuration library class search for files with ".conf.php" sufix inside environment subdirectories. If a configuration file with same target name and sufix ".default.conf.php" exists inside configuration folder, it will be loaded before the environment configuration.

All *.conf.php must define an array variable named $conf with key pair.

You can overwrite key pairs configuration for specific hosts by defining the array $over_conf where the first key is the host and is value is an array with key pairs to be overwriten.

The Springy Framework uses some pre-defined configuration files like db, mail, soap, system, template and uri.

All other configuration files are used only 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.