File: documentation/en/

Recommend this page to a friend!
  Classes of Fernando Val  >  Springy  >  documentation/en/  >  Download  
File: documentation/en/
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: Springy
Microframework for Web application development
Author: By
Last change: Documentation
Date: 1 year ago
Size: 1,201 bytes


Class file image Download



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.

Creating Controllers

To create a controller all you need is put a file named containing a class named NameOfThePage_Controller inside the controllers directory.

The names of the files must be correspondent to the URL who the user is accessing and it is case sensitive, followed by the suffix .page.php.

If the user is accessing the page /my-first-page then the controller file must have the name to the framework call it.

Your class can extends the Springy\\Controller class.

The follow example show a simple controller code:

use Springy\Controller;

class MyController_Controller extends Controller
    public function _default()

For more information send a message to info at phpclasses dot org.