I am a complete Magento 2 noob. I know a lot of things changed, one of which is how to get the Singleton Mage:: instance and its methods. I know it is moved to vendor/ directory from Mage/Code/Core, but I still don't know how to call Mage:: and invoke the methods for getting the model and other things, like order total amount, and order items. I need this in order to implement a module, but also independently of the module, in a pure PHP page. How can I access Magento methods in Magento 2? I tried:
namespace Vendor\Module_Name\Block\Product;
$objectManager = Magento\Core\Model\ObjectManager::getInstance();
but it didn't work, I got the error message:
Class 'Vendor\Module_Name\Block\Product\Magento\Core\Model\ObjectManager' not found in /Applications/MAMP/htdocs/magento2/retrieveTotalOrders.php on line 8