private function _loadInterpreterConfig($config)
    {
        if (count($config) < 3) {
            throw new \yii\base\Exception(\Yii::t('ib', 'Invalid config for interpreter. Missing required keys.'));
        }

        $this->viaModel = new $config[self::INDEX_VIA_CLASS];

        if (isset($config[self::INDEX_VIA_CURRENT])) {
            $this->viaCurrent = $config[self::INDEX_VIA_CURRENT];
        }

        $this->relPrimary = $this->viaModel->getRelation($config[self::INDEX_REL_PRIMARY]);

        $this->relSecondary = $this->viaModel->getRelation($config[self::INDEX_REL_SECONDARY]);

        $this->relPrimaryKey = array_pop($this->relPrimary->link);

        $this->relSecondaryKey = array_pop($this->relSecondary->link);
    }