Magento Design Patterns

后端 未结 8 1100
北海茫月
北海茫月 2021-01-29 22:59

Magento, IMHO, represents a PHP system that is built on well thought-out coding principles - reuseable design patterns being one of them. In terms of an example of a PHP system

8条回答
  •  误落风尘
    2021-01-29 23:51

    I think that the relationship between Mage_Checkout_Model_Cart and Mage_Sales_Model_Quote is a Bridge design pattern. As defined by wikipedia Bridge is meant to "decouple an abstraction from its implementation so that the two can vary independently". Thus, Cart seems to be the abstraction and Quote seems to be the implementation.

提交回复
热议问题