Magento execution process?

Source: Internet
Author: User
: This article mainly introduces the execution process of Magento ?, If you are interested in the PHP Tutorial, refer. The execution process of Magento can be fully described in a diagram.


Magento is also a mvc program, but it is different from the common mvc structure.
We can see the execution process of his program through one of its registrations:
First, enter http: // localhost/magento/index. php/customer/account/create/in the address bar to enter the registration page.
Step 1: The app/code/core/Mage/customer module is automatically located at the Customer in the url obtained by the program.
Step 2: The account obtained by the program will be automatically located in the controller file app/code/core/Mage/Customer/controllers/AccountController. php
Step 3: If the program obtains "create", The createAction () method is found in the controller file.

public function createAction(){    if ($this->_getSession()->isLoggedIn()) {    $this->_redirect('*/*');    return;    }    $this->loadLayout();    $this->_initLayoutMessages('customer/session');    $this->renderLayout();}

Step 4: execute the program to load the customer. xml in the app/design/frontend/base/default/layout/directory. Then, find Label


  
   Customer Account Registration Form
   
   
    
   
    
     page/1column.phtml
    
   
   
    
     
      Form Fields Before
     
    
   
  

Step 5: In customer. the block and template to be used are defined in xml. the corresponding file directories are app \ code \ core \ Mage \ Customer \ Block \ Form \ Register. php and app \ design \ frontend \ base \ default \ template \ customer \ form \ register. phtml
You can use $ this in the template file to compile the class method.
Therefore, the execution process of the magento program can be summarized as follows:
Get execution controller-> Process business logic and model data in execution method-> controller instantiate layout object-> layout object instantiate block according to request-> block and template one-to-one matching to complete the display logic.

What is the execution process of Magento ?, Including some content, hope to be helpful to friends who are interested in PHP tutorials.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.