N98\Magento\Command\AbstractMagentoCommand::_getResourceModel PHP Method

_getResourceModel() protected method

Magento 1 / 2 switches
protected _getResourceModel ( string $mage1code, string $mage2class ) : Mage_Core_Model_Abstract
$mage1code string Magento 1 class code
$mage2class string Magento 2 class name
return Mage_Core_Model_Abstract
    protected function _getResourceModel($mage1code, $mage2class)
    {
        if ($this->_magentoMajorVersion == self::MAGENTO_MAJOR_VERSION_2) {
            return \Mage::getResourceModel($mage2class);
        } else {
            return \Mage::getResourceModel($mage1code);
        }
    }