N98\Magento\Command\Config\SearchCommand::_getPhpMageStoreConfigPathFromMatch PHP Метод

_getPhpMageStoreConfigPathFromMatch() защищенный Метод

protected _getPhpMageStoreConfigPathFromMatch ( object $match ) : string
$match object
Результат string
    protected function _getPhpMageStoreConfigPathFromMatch($match)
    {
        switch ($match->type) {
            case 'section':
                $path = $match->node->getName();
                break;
            case 'field':
                $parent = current($match->node->xpath('parent::*'));
                $parent = current($parent->xpath('parent::*'));
                $grand = current($parent->xpath('parent::*'));
                $grand = current($grand->xpath('parent::*'));
                $path = $grand->getName() . '/' . $parent->getName() . '/' . $match->node->getName();
                break;
            case 'group':
                $parent = current($match->node->xpath('parent::*'));
                $parent = current($parent->xpath('parent::*'));
                $path = $parent->getName() . '/' . $match->node->getName();
                break;
            default:
                // @TODO Why?
                throw new RuntimeException(__METHOD__);
        }
        return "Mage::getStoreConfig('" . $path . "')";
    }