Thread: Decorator logic
View Single Post
  #1  
Old 11-13-2019, 12:46 PM
  vasilis's Avatar 
vasilis vasilis is offline
 

X-Adept
  
Join Date: Feb 2009
Posts: 758
 

Default Decorator logic

I have been reading about the Decorator logic in the old LiteCommerce software, in this page where there is the following text:

Quote:
Decorator's primary purpose is to support the extensibility of the functionality through class inheritance. In particular, solving the problem described in the previous chapter. It renames classes in the inheritance chains so that the application begins to use the extending class too. Suffix “Abstract” is appended to the base class name, and an empty dummy class with the original base class name is inherited from the custom class. Example:

Core code: SomeCoreClass (base class) -> SomeCustomClass extends SomeCoreClass (custom class)

Generated cache: SomeCoreClassAbstract (renamed base class) -> SomeCustomClass extends SomeCoreClassAbstract (custom class) -> SomeCoreClass extends SomeCustomClass (blank dummy class)

Thus, the functionality of the custom class gets into the base (modifyable) class.

Does the same logic exist for X-Cart 5 as well, or has it changed ?
Reply With Quote