Minor "PHP Framework" 1. Introduction, Introduction to the minorphp framework
What is 1.1 minor?
Minor is a simple but excellent PHP framework, It just did what the a framework should do. Just do a framework should do, simple and powerful!
Framework GitHub Address: Github.com/orlion/minor
( If you feel good give a star Oh (^) V)
Author: orlion
Know: Https://www.zhihu.com/people/orlion
Github:https://github.com/orlion
What's 1.2 minor?
1.2.1 Minor mainly provides:
Why did 1.2.2 Minor only offer such a little thing?
Now the PHP framework is mostly bloated, providing a variety of functions, in my opinion this is just a repetition of the wheel (although the writing frame is also repeated in the creation of the wheel ...) , the framework only needs to provide the user with a shelf and some tools, should not give the user a lot of things (a lot of repetitive built wheels), should not bundle users and should give users a great deal of freedom, which will make users more easy to use. Personally think that the Java Spring Framework is a very good framework, simple enough, strong enough, small is beauty! And minor is the framework under which this thought was born. No mess of paging, ORM, template engine, logs, queues and other functions, is a very pure "shelf".
1.2.3 Advantages
Fast! High Performance! Simple! Easy to get started! Clear Structure!
Small is beauty!
1.3 Installation
Simply copy the zip package from GitHub (Github.com/orlion/minor) git clone or just unzip it into your project.
The minor frame is removed by setting the public/.htaccess
file in the link index.php
. If your server is using Apache, be sure to turn on the mod_rewrite
module.
In the case of an Nginx server, place the following instructions in the URL's configuration file:
Location/ { try_files $uri $uri//index.php? $query _string;}
This way, when you visit http://localhost/public/, you can see the installation Success screen. (Of course you can also configure the public to remove)
1.4 Minor how it works.
1.4.1 Overall process
Take a visit to URL http://www.servername.com/demo/test as an example:
How the 1.4.2 app handles requests
Public functionHandle (Minorrequest$minorRequest) { $minorResponse= Minorresponse::getinstance (); $this->minorrequest =$minorRequest; List($controllerName,$actionName,$params) =$this->router->dispatcher ($minorRequest-getUrl ()); if(! ($controllerName&&$actionName&&Is_array($params))) { if(! Config::get ([' App ' = ' DEBUG ']) && ($handler= Config::get ([' App ' = ' 404_handler ') ') && ($handlerinstanceof \closure)) { $handler($minorRequest-Getrequesturl ()); } Else { Throw NewRouteexception (' 404 Not Found '); } } Else { $minorResponse=$this->invoke ($controllerName,$actionName,$params); } return $minorResponse; }
1.5 Please ignore the above blowing fields
Well! is to please ignore. Don't blame me for not reminding you.
http://www.bkjia.com/PHPjc/1133571.html www.bkjia.com true http://www.bkjia.com/PHPjc/1133571.html techarticle Minor "PHP framework" 1. Introduction, minorphp Framework Introduction 1.1 Minor is what Minor is a simple but excellent PHP framework, It just did what the a framework should do. Just do a framework should ...