Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/riimu/baremvc
Bare bones MVC to provide controller/view structure
https://github.com/riimu/baremvc
Last synced: about 2 months ago
JSON representation
Bare bones MVC to provide controller/view structure
- Host: GitHub
- URL: https://github.com/riimu/baremvc
- Owner: Riimu
- License: mit
- Created: 2013-11-04T15:03:01.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-05-16T15:37:56.000Z (over 10 years ago)
- Last Synced: 2024-04-30T13:44:29.637Z (9 months ago)
- Language: PHP
- Size: 172 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bare bones MVC to provide controller/view structure #
This is not fully featured MVC. This probably does not provide all the features
you are looking for. In fact, this framework doesn't even understand the Model
part of MVC. The entire purpose of this MVC is to provide as simple as possible
framework for simplistic websites in order to have separate controllers and
views and a sane way to link them on web pages using mod_rewrite.If you need anything more, I would recommend something like Symfony 2.
## Usage ##
In order to properly use this MVC, you should probably set up your .htaccess
file to redirect all calls to the index file. For example:```
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php?path=$1 [L]
```If you want to follow the default ideology of this MVC, you should have folders
like 'controller' and 'view' for controllers and views. Then, create a bootstrap
in index.php that should probably look something like this (assuming usage of
composer):```php
run();
```For example of how the controllers and views are meant to be used, see the
files in the example folder, which provides a working example.## Credits ##
This library is copyright 2013 to Riikka Kalliomäki