问题
i would like to use some classes that are into lib/Varien
, my idea is to copy the classes into my project and put my classes to inherit from Varien's, actually i can do it, just using Ctrl-C and Ctrl-V. lol, what i really mean is if i do it, am i violating the copyright, law or maybe some license agreement of Magento?
回答1:
EDIT: read Alan's post below. He is correct. While a profit-seeking venture should still consult a lawyer for any such project, there doesn't appear to be any issue with using the code for a personal project.
This isn't a programming question (rather, it is a legal question), but at least for the moment, let me say that those files are copyright of Magento Inc, and they reserve that copyright for those files. You do not have a legal right to copy those files into another project for you own use.
If you do copy them into your project, never try to sell it. Having taken their code, your code will have become a liability to any potential acquiring company.
Of course, I am not a lawyer, so if this is a big issue, feel free to contact one for more detailed information.
回答2:
Assuming you're talking about the Community Edition, all Magento code is released under the "Open Software License". This means you're free to use the code, so long as you give a full copy of your source code to whomever you distribute your application to, and accept that this copy of your source code is now licensed under the Open Software License as well.
That's the simple version. Open source licenses that put non-monetary restrictions on code re-use exists in a weird legal state, as most business related court cases are usually about, and settled on, money. OSL has a bunch of additional provisions which cloud how things can be distributed, so if you were doing this for a commercial project you should talk to a lawyer.
回答3:
@Alan's answer is entirely correct with regard to Magento's PHP code in app/code
and lib/Varien
, however the theme files in app/design
, js/mage
and skin
are released under Apache Free License, which (as I understand it) allows you to distribute that code under whichever license you wish (including closed or proprietary licenses), requiring only attribution.
The official Magento statement is here, and Roy Rubin from Magento posted re this topic on the Magento boards.
As per @Joseph's disclaimer, I am not a lawyer and would recommend that you consult a lawyer. Do have a read of the wikipedia article on AFL if you wish. For reference, the OSL wikipedia article as well.
I recognize that this question specifically asked about Magento's classes, I'm merely adding the AFL status for completeness and future visitors' information.
来源:https://stackoverflow.com/questions/5221255/can-i-use-magentos-classes-in-my-project