PHP Classes

Silex MVC Blog: MVC based blog using on the Silex micro-framework

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 161 All time: 8,956 This week: 673Up
Version License PHP version Categories
silex-mvc 1.0.0MIT/X Consortium ...5PHP 5, Libraries, Blogs
Description 

Author

This package implements a MVC based blog application using on the Silex micro-framework, created by Symfony2 components.

The application features:

- Expands with configuration files
- It works as a web or as a console application
- Supports localization currently for two languages: English and Russian
- Implements user registration and authentication
- Uses a SQLite database but can work supported by Doctrine DBAL, ORM and PHP ActiveRecord
- Uses Twig template engine
- Library of SwiftMailer is used for email
- Added services such as Zend-Filter, Zend-Json and others
- Added services for working with arrays, strings, XML, HTTP, Markdown

Picture of Sergey Beskorovayniy
  Performance   Level  

 

Documentation

silex-mvc

Simple framework implements a design pattern MVC, based SILEX (PHP micro-framework, created by Symfony2 components). I have taken some ideas from the project GitHub (silex-enhanced). The documentation can be found on the SILEX Online. Examples of installation of the framework given for OS "Windows" and web server Nginx.

Main features of the application:

  • application implements a simple application management blog.
  • expands with configuration files located in the `app/Resources/?onfig`.
  • it works as a web or as a console application.
  • console application can perform various tasks (e.g. Creation of a database `app/Console/scripts/orm/schema_create.bat`).
  • as an example, the work of the console application implemented to work with the service UBKI.
  • realized the localization of two languages: English and Russian.
  • ensures the registration process, user authentication and authorization.
  • the database created two users with the appropriate rights. The Administrator (login = admin; pass = foo), User (login = user; pass = foo).
  • uses a database type SqlLite `app/Resources/db/app.db`.
  • work with databases provided by Doctrine(DBAL, ORM) `vendor/doctrine` and PHP ActiveRecord `library/AR`.
  • realized the possibility output the pages using the library Pagerfanta `library/Pagerfanta`.
  • used template Twig `vendor/twig`.
  • library of SwiftMailer is used for email `vendor/swiftmailer`.
  • added services such as Zend-Filter, Zend-Json and others `vendor/zendframework`.
  • added services for working with arrays, strings, XML, HTTP, Markdown `app/Services/My`.
  • on the client side using the library: jQuery, Bootstrap 3, RequireJS, Backbone, Vue `public/js/lib`.
  • client-side services are used: Datepicker, FormValidation, MaskInput, Highlight `public/js/app/services`.
  • `ToDo` implemented application (for the local or server storage) to show the work of the framework Backbone.js `public/js/app/bb-todo`.
  • `ToDo` implemented application (for the local storage) to show the work of the framework Vue.js `public/js/app/vue-todo`.

Learn more...

Installing

Prerequisites

Deploying

  1. Clone silex-mvc project with git.
  2. Run `composer install`.
  3. To create a database run the batch file from the console `app/Console/scripts/orm/schema_create.bat` pre-editing the path to` php.exe` and `app\Console\index.php`;
  4. Configure the web server so that the entry point was `public/index.php`.
  5. Set, if necessary, the appropriate permissions to write to `path/to/project/var`.
  6. Access your project url with web browser.

Configuration

parameters.yml

Values for config parameters substitution. On application code parameters are accessible through Silex\Application instance $app['config']['parameters'].

config.yml

General configuration is used as a Web application and a ?onsole application. Put your service providers under service_providers section.

service_providers:
    swiftmailer:
        class: Silex\Provider\SwiftmailerServiceProvider
        parameters:
            swiftmailer.options:
                host: %mail.host%
                port: %mail.port%
                username: %mail.username%
                password: %mail.password%
                encryption: %mail.encryption%
                auth_mode: %mail.auth_mode%
...

console.yml or application.yml

The console and web bootstrap config respectively. If you use imports statement the config will be merged recursively allows partial specific configs.

security.yml

The security firewalls and access control config. All information about it's available here.

env.yml

It is often helpful to have different configuration values based on the environment the application is running in. For example, you may wish to use a different cache driver locally than you do on your production server.

For this task you can create a file env.yml with specific settings and place it in the root of your application. The file env.yml will replace the values of existing file parameters.yml.


  Files folder image Files (692)  
File Role Description
Files folder imageapp (1 file, 8 directories)
Files folder imagelibrary (2 directories)
Files folder imagepublic (3 files, 4 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file LICENSE.md Lic. License
Accessible without login Plain text file README-RU.md Doc. Documentation
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:161
This week:0
All time:8,956
This week:673Up