diff --git a/.gitignore b/.gitignore index 3e759b7..5b14845 100644 --- a/.gitignore +++ b/.gitignore @@ -193,6 +193,8 @@ PublishScripts/ csx/ *.build.csdef +._* + # Microsoft Azure Emulator ecf/ rcf/ diff --git a/README.md b/README.md index e0d315f..8509fe6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,385 @@ # phacil-framework A super easy PHP Framework for web development! + +## Requirements + + - PHP 5.3+ + - OPCache PHP Extension + - HTTP Web Server (Apache 2.4+ recomended) + +## Structure + +| Folder | Description | +| ------ | ------ | +| Controller | Contains the structure and files of controllers code | +| Model | Contais directories and files for the model code | +| View | Contains the template files | +| Cache | Full writable default cache storage | +| public_html | Contains the index.php and .htaccess Apache file. All your access public files stay here, like CSS, JavaScript, etc. | +| System | Most important folder of this framework. Contains the libraries, classes and anothers features to improve correct working for the Web App. | +| Logs | Contais debug and error logs | +| config.php | File with contains all basic configurations for the Web App, like DB connection, mail config, directory config, etc.| + +## Get started! + +Copy or clone this repository in your computer/server and edit the config.php file. See below the Config File Basic Options. + +### Hello World! sample + +This is a simple Hello World! for this framework. + +1. In **controller** folder, create a folder called *common* and create a file called *home.php*. +2. Edit **controller/common/home.php** like that. + + ```php + data['variable'] = "Hello World!"; + + $this->out(); + } + } + ``` + +3. Now create a folder insede view called **default** and a subfolder called **common** and a file home.twig. +4. Edit the **view/default/common/home.twig** like this. + + ```html +
_reservePlace("