The documentation for the version of this framework based on SlimPHP 3 can be found here.
This is a template web-application (powered by SlimPHP 4), that can be extended to build more complex web applications.
While it is not necessary to have expert understanding of the SlimPHP 4 framework (https://www.slimframework.com/docs/v4/) in order to build web-applications with this template application framework, such understanding would help in maximizing the capabilities of this template application framework.
It adds the Model-View-Controller structure to your web-application. Actually, really more of Controller-View functionality with a model folder provided for housing your Model classes (leaving you with the responsibility of choosing whichever ORM / Database Access Library suits your needs or are most comfortable with)
Provides a skeleton folder / directory structure for your application:
./path/to/newly/created/app
|-- config/
|-- languages/
| |-- en_US.php
| `-- fr_CA.php
| |-- app-settings.php
| |-- app-settings-dist.php
| |-- dependencies.php
| |-- env.php
| |-- env-dist.php
| |-- ini-settings.php
| `-- routes-and-middlewares.php
|
|-- logs/
|
|-- public/
| |-- css/
| |-- images/
| |-- js/
| `-- index.php
|
|-- src/
| |-- controllers/
| |-- layout-templates/
| |-- models/
| |-- views/
| `-- AppErrorHandler.php
|
|-- tests/
|
|-- tmp/
|
|-- vendor/
|
|-- .gitignore
|-- composer.json
|-- composer.lock
`-- README.md
Provides some helper functions like sMVC_UriToString(\Psr\Http\Message\UriInterface $uri),
sMVC_addQueryStrParamToUri(\Psr\Http\Message\UriInterface $uri, $param_name, $param_value), etc. in the default global namespace and a few string helper functions in the SlimMvcTools\Functions\Str
namespace
Provides an automatic routing scheme for mapping request urls to methods in Controller classes that are sub-classes of SlimMvcTools\Controllers\BaseController
. You don't need to define any routes for your application if you adhere to using Controllers that are compatible with the routing scheme
Ships whith a BaseController class (i.e. SlimMvcTools\Controllers\BaseController
) that provides methods for authentication (login, logout & checking authentication status), listing all methods in all controller classes in an application that can be automatically routed to if the automatic MVC routing is enabled, forcing HTTP 400, 401, 403, 404, 405, 410, 500 & 501 responses and methods for rendering php view and layout files using the light-weight and easily extensible Rotexsoft\FileRenderer\Renderer class. Take a look at the class for a full list of methods that can be used in your applications.
Provides a command-line script for creating Controller classes (that extend SlimMvcTools\Controllers\BaseController
or any of its descendants).
./vendor/bin/smvc-create-controller
on *`nix-like** Oses and **
.\vendor\bin\smvc-create-controller.bat** on **
Windows`**
./vendor/bin/smvc-create-controller-wizard
is the interactive version of ./vendor/bin/smvc-create-controller
Ships with a very minimal amount of composer / packagist dependencies (all of which are used by SlimMvcTools\Controllers\BaseController
) in order to allow you to include only additional dependencies that suit the specific needs of your application. Thereby reducing the possibility of having unused / unneeded dependencies in your application. The following packages are used in this framework:
You should also look at the public methods available in \SlimMvcTools\Controllers\BaseController which all your applications' controller classes will be extending & which will come in handy in your applications like the forceHttp###, getResponseObjForLoginRedirectionIfNotLoggedIn, isLoggedIn, makeLink, renderLayout & renderView methods
Strives to adhere strictly to the PSR-7 HTTP messages and psr/container interfaces, in order to make it easy to use different implementations of the PSR-7 request and response objects and psr/container compliant containers
These are the branches in this repository:
There should always be a slim-#-edition-versions-x.x branch that will be synced with master and from which the latest major versions will be tagged. The composer.json in this branch will require the most recent stable version of rotexsoft/slim-skeleton-mvc-tools as opposed to the dev-master version that will always be required in the composer.json in the master branch.