Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento rewrite /lib/ file?

Tags:

php

magento

The only way I've found through search to override a /lib/ file, specifically /lib/Varien/File/Uploader/, is to move the file to /local/Varien/File/ and edit it there.

This is fine and all, but I'd like to have the modified file in my modules namespace. Similar problems, like how to do this with core files, involve rewriting them in your config.xml. Is it possible to rewrite a /lib/ file in config.xml?

like image 389
swl1020 Avatar asked Feb 13 '13 18:02

swl1020


1 Answers

No, it's not possible. If you look at how the classes in lib/Varien are instantiated you will see that no factory method is used but the classes are referenced directly by name.

like image 124
Fabian Schmengler Avatar answered Oct 05 '22 23:10

Fabian Schmengler