Description of ThinkPHP3.2.2 plug-in controller function and thinkphp3.2.2. Description of ThinkPHP3.2.2 plug-in controller function. thinkphp3.2.2 description of ThinkPHP supports calling of plug-in controller from version 3.2.2.
tips, you can look at the framework's API document to find several major classes or interfaces, and then understand the overall framework model and the basic architecture (SPRINGMVC component architecture to see the first time), and then through these major classes, and interfaces to learn. In fact, like this relatively mature open source framework, the naming and annotation of the class is quite normative, as well as the specific use of some design patterns, code philosophy is very worthy o
certain requirements:
The method must be public.
Method cannot be a static method.
Method cannot make an extension method.
The method cannot be a constructor, an accessor, or a set.
Method cannot have an open generic type (open generic types).
Method cannot make a method in a controller base class.
The method cannot contain a ref or out parameter.
6.2 Blocking public methods from being called
If you need to create a public method in the
character in Razor is @, and razor is smart to make it very popular. Smart: Most of the characters can be judged by their own properties or displayed.HTML encoding avoids XSS attacks, which are detailed in later articlesRazor Syntax ExamplesLayout is equivalent to the master page in Web Forms① Create a new MVC5 layout page sitelayoutpage.cshtml layout page can be thought of as a special view.② Create a view associated with itIndex page We made a good understanding of the correlation, the test p
controller can operate push (push in) pop (jump))When the one controller is pushed in, the one controller is placed in the stack as both the bottom of the stack and the top of the stack. Then the view of one controller is created and placed on the view of the navigation controllerWhen the one
the view parserHave the same configuration, the two methods of the same effect.Three, Multisimplecontroller (multi-action Controller):Multi-action controller is to reduce a large number of defined controller classes, you can implement multiple actions in the same class inside the operation, to achieve functional integration.The configuration of the Multisimpleco
Description of ThinkPHP3.2.2 plug-in controller function, thinkphp3.2.2
ThinkPHP versions 3.2.2 support calling plug-in controllers. You can access the Controller defined by a plug-in the module through a more convenient URL address.
When the plug-in Controller Variable is input in the URL, the Operation Method in the
"; } @RequestMapping ("/test3") public String test3 (@FormObj (value = "D", show = False) Dept Dept, @FormObj ("E" Employee EMP) { return "index";}} The results are as follows:SummarizeWrite so much, mainly to consolidate their own SPRINGMVC on the request and response to a detailed summary of the process, I do not know if you have clear the procedure.The main thing to be familiar with this part is to familiarize yourself with the Handlermethodargumentresolver and Handlermethodretur
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.