https://github.com/janst123/jsmf
Small PHP framework for building MVC-based applications
https://github.com/janst123/jsmf
orm-php-framework php php-framework php-library php7
Last synced: 3 months ago
JSON representation
Small PHP framework for building MVC-based applications
- Host: GitHub
- URL: https://github.com/janst123/jsmf
- Owner: JanST123
- License: lgpl-3.0
- Created: 2017-01-14T13:26:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-24T06:17:35.000Z (almost 6 years ago)
- Last Synced: 2025-01-03T16:53:17.222Z (5 months ago)
- Topics: orm-php-framework, php, php-framework, php-library, php7
- Language: PHP
- Homepage:
- Size: 1.9 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Welcome to the JSMF - The Jan S. MVC Framework
With this framework you can build a whole MVC (Model-View-Controller)-based PHP Application or just use it as a collection of useful PHP classes. All parts of the framework can be used individually.
See the [ApiIndex](docs/ApiIndex.md) for all available classes and methods.
Please refer to the **example application** while the documentation is in this incomplete state.
## Installation
You can install JSMF via Composer. Add the following dependency to your composer.json
```json
{
"require": {
"janst123/jsmf":">=1.0.0"
}
```You can also clone JSMF from this repository (use the version tags or clone the master branch for latest changes). In this case you have to write your own autoloader.
## Sample Application Bootstrap
This is only needed if you want to base your whole application on JSMF. You can also use single Classes, using the JSMF autoloader or your own.Place this code in your applications index file. Route all request thru this file (See this [Gist](https://gist.github.com/RaVbaker/2254618) for an introduction on how to route all requests to index.php with Apache)
Using this minimal setup will let the JSMF\Application class determine the Model/Controller/Action from the request url (http://host/module/controller/action).If one or more url parts are not present, the application will always use the "index" action (the "index" controller, the "index" module).
Example: Requesting http://host will try to call module "index" -> IndexController -> indexAction, Request to http://host/misc/faq will call module "misc" -> FaqController -> indexAction
```php