How to start?



Getting started with yesFramework is very simple and quick. Please download the latest version of a package here . Pack consists of the following files and folders

The content to be copied in such a way that the public directory equal to a directory in which files are located by default web page to the user. Then call your web site. You'll see your home page. Done! You installed and launched yesFramework!

What now?

For a start, locate the config.php on src/yesFramework/Core folder . This is the startup file, which you can find a place to enter basic configuration data, such as those web address, e-mail, and data access to the database. Proper implementation of these data is necessary for the proper operation of the framework. In config.php you've probably noticed that the default controller is a file welcome.php . This file is responsible for the home page you see after calling website. This file can be found in src/yesFramework/App/Controllers/. Check this file to find out how yesFramework supports models.

Add new controller

Controllers are called according to the following pattern:
www.example.com/index.php?page=controller_name

The name of the controller is the name of the php file format in the src/yesFramework/App/Controllers/. Also call http://yesframework.com/index.php?page=yourcontroller will produce a file called yourcontroller.php in src/yesFramework/App/Controllers/

Add View

To load a selected view, the controller must enter the following line:
 Base::load_view('template_name.php ', 'content_name.php ', $data_to_body); 

The $data_to_body is an array of elements that will be injected into the file template_name.php and content_name.php, which is located in the App/Views .

Example
$data_to_body = array(
	"header" => "example header",
	"data_from_class" => $data_from_class,
	"footer" => "example footer"
);

Base::load_view('template.php', 'content.php', $data_to_body);
In template.php i content.php will arise variables named $header, data_from_class and $footer that will contain values ​​from the array.

Summary

I encourage you to read through the documentation with examples here . I hope this quick start is quite understandable.