3

What is the difference and when to use vendor/magento/framework code, and when to use the vendor/magento/module-* code?

4

Under the vendor/magento/framework folder, magento 2 is keeping its core logic, the basic functionalities which are widely used in the rest of the modules under the vendor/magento/module-*/.

For example take a look in vendor/magento/framework/Url.php class and you will find methods as getUrl() or getCurrentUrl(). Or in vendor/magento/framework/Registry.php class, at registry($key), register($key, $value, $graceful = false), unregister($key) methods.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.