A method is used to instantiate the controller internally, calling the format:
A (' [Project://][Grouping/] module ', ' Controller layer name ')
Simplest usage: $User &http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp;= A" (' User '); Represents the Useraction controller that instantiates the current project (the corresponding file for this controller is located in lib/action/useraction.class.php), if grouping mode is used, and the controller to instantiate another admin group can use: $User = A (' Admin/user '), also supports cross project instantiation (project directory to maintain sibling) $User = A (' Admin://user '); represents the Useraction controller under the instantiated Admin project
The 3.1 version adds support for tiered controllers, so you can instantiate other controllers with a method, such as $User = A (' User ', ' Event '), userevent Controller (the corresponding file is located in lib/event/ UserEvent.class.php).
After instantiating the controller, you can invoke the method in the controller, but it should be noted that, in the case of cross project invocation, if your method of operation has special variable operations against the current controller, there will be some unknown problems, so, in general, the official recommendation requires a common call to the controller layer to be developed separately, Don't have too many dependencies.
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.