Download the PHP package mcshane/chem-mvc without Composer
On this page you can find all versions of the php package mcshane/chem-mvc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package chem-mvc
Chemistry MVC
A lightweight, highly use-case configurable, extensible, easy to integrate MVC framework with an implemented strict custom class mapping and casting process for controller action parameter data types(objects specifically)
Installing
Install through composer with:
Start faster with a template
Just replace 'my-project' with the name of your project
Delete the newly installed composer files in 'my-project' root and cd to 'my-project'/app/ and run
The project structure is now setup and composer dependencies installed. You're ready to start building your web project.
To the controllers.
Usage
Chem MVC works off of a routing catalyst that assumes a url stucture of
Take the following url for example
With Chemistry MVC's default routing, this url would invoke the '/home/index' action. 'home' being the default controller name and 'index' being the default action name. In turn the above url would be equivilant to.
While these routing behaviours can be altered, this will assume you keep them the same.
Traverse your project to my-project/app/controllers/homeController.php
It should look as follows from a fresh install of the template
Simply enough, this homeController Class has one index Action. The index action calls the extended ChemMVC\controller class' view method. This method automagically locates the file my-project/app/views/home/index.php. This behaviour is possible for any action in any controller. Where controller name is the directory and the action name is the file name + '.php'
e.g. with homeController as
then
would process and return the result of my-project/app/views/home/couldBeCooler.php just like that.
More to Come
Got any ideas for improvements? Fork this repo and make your art. I haven't even talked about TDBM(linked below).
Depenedency List(and reasons why they are here):
- TDBM - Modeling your database into usable php classes with CRUD operations, data structuring and data requirements built in.