View Issue Details

IDProjectCategoryView StatusLast Update
0000542OXID eShop (all versions)4.07. Source code, Testpublic2012-12-10 13:45
Reporterandreas_ziethen Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionsuspended 
Product Version4.0.0.2 revision 14967 
Summary0000542: make autoloader configurable
DescriptionA very nice feature would be to have the possibility to configure the autoloader, which could easily be done by reading the array of the included class-dirs from a config-variable.

This would give you the possibility to implement your own subdirectories and get a more cleare structure of your own extensions (e. g. of core- and view-classes or own tools placed in subfolders in the shop directory).
TagsNo tags attached.
Theme
BrowserAll
PHP Version5.2.6
Database Version5.0.33

Activities

tomas_liubinas

2009-01-27 14:59

reporter   ~0000405

I am sure there is a way to implement that, just the general problem with such features is that __autoload() method is one of first methods defined in the shop. So it should work before oxConfig or database connection is initialised. And normally config options are stored in the database.

andreas_ziethen

2009-01-29 17:13

reporter   ~0000409

Hi Tomas,

take a closer look at oxfunctions: oxConfig::getInstance() is actualy already used inside the autoloader - so it seems to be present, doesn't ist? ;-)

On the other hand - the easiest way to implement it would be to put a

if( !function_exists('__autoload')) {
...
}

around it - but I am not sure it this works with magic functions .. - I never tried that.

cheers
Andreas

tomas_liubinas

2009-02-09 17:31

reporter   ~0000423

Last edited: 2009-02-09 17:32

Yes you are right, actually this place is a bit tricky as __autoload() is used for oxConfig initialisation as well. But yes, this config option could be used for later classes anyway. Or module subdirs could be detected automatically. Just I would suggest to treat this request more as a feature request not as a bug ;)

dainius.bigelis

2009-02-10 16:56

reporter   ~0000424

This is already marked as a feature reqest. Thought as here only bug cases are collected, this entry is moved to Wishlist and will be considered for implementation later.