Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Need help understanding class and view heirarchy

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 12-22-2015, 01:54 PM
 
codegrunt codegrunt is offline
 

Member
  
Join Date: Dec 2015
Posts: 10
 

Default Need help understanding class and view heirarchy

Howdy. I am finding it hard to get my head around the naming methodology in X-Cart 5.2. I am missing something fundamental I think.

Here is an example. . .

The core view that is responsible for actually running the search and then displaying product search results is:

Code:
classes/XLite/View/ItemsList/Product/Customer/ACustomer.php

I understand that this is a product specific itemlist under the customer scope. What I do not understand is why this view is called "ACustomer.php". Why is this not handled in "Search.php"?

As a general question, what is the significance of the "A[object].php" naming scheme? How do you predict which physical class file is responsible for a given view?

Any help appreciated.
__________________
multiple versions (4 and 5)
Reply With Quote
  #2  
Old 12-22-2015, 03:24 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Need help understanding class and view heirarchy

A[object].php is AbstractObject.php. This class is not intended for direct use. The search class you are looking for will extent this one as well as other classes so the A[object].php class will have more common methods to be reused from other end classes
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 12-23-2015, 03:00 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Need help understanding class and view heirarchy

In X-Cart there is a lot of places that display different kinds of product lists. All these lists share some common logic that is implemented by this ACustomer class. And for each list there is its own class (extended from ACustomer) that adds the bits specific for that particular product list.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #4  
Old 12-23-2015, 09:57 AM
 
codegrunt codegrunt is offline
 

Member
  
Join Date: Dec 2015
Posts: 10
 

Default Re: Need help understanding class and view heirarchy

Thanks Alex, Steve. Duh for not connecting "Abstract" to the "A" prefix.
__________________
multiple versions (4 and 5)
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:22 AM.

   

 
X-Cart forums © 2001-2020