View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000542 | OXID eShop (all versions) | 4.07. Source code, Test | public | 2009-01-27 10:36 | 2012-12-10 13:45 |
| Reporter | andreas_ziethen | Assigned To | |||
| Priority | normal | Severity | feature | Reproducibility | N/A |
| Status | closed | Resolution | suspended | ||
| Product Version | 4.0.0.2 revision 14967 | ||||
| Summary | 0000542: make autoloader configurable | ||||
| Description | A 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). | ||||
| Tags | No tags attached. | ||||
| Theme | |||||
| Browser | All | ||||
| PHP Version | 5.2.6 | ||||
| Database Version | 5.0.33 | ||||
|
|
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. |
|
|
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 |
|
|
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 ;) |
|
|
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. |