Interceptor.php 5.55 KB
Newer Older
Ketan's avatar
Ketan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
<?php
namespace Magento\Framework\App\ResourceConnection;

/**
 * Interceptor class for @see \Magento\Framework\App\ResourceConnection
 */
class Interceptor extends \Magento\Framework\App\ResourceConnection implements \Magento\Framework\Interception\InterceptorInterface
{
    use \Magento\Framework\Interception\Interceptor;

    public function __construct(\Magento\Framework\App\ResourceConnection\ConfigInterface $resourceConfig, \Magento\Framework\Model\ResourceModel\Type\Db\ConnectionFactoryInterface $connectionFactory, \Magento\Framework\App\DeploymentConfig $deploymentConfig, $tablePrefix = '')
    {
        $this->___init();
        parent::__construct($resourceConfig, $connectionFactory, $deploymentConfig, $tablePrefix);
    }

    /**
     * {@inheritdoc}
     */
    public function getConnection($resourceName = 'default')
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getConnection');
        if (!$pluginInfo) {
            return parent::getConnection($resourceName);
        } else {
            return $this->___callPlugins('getConnection', func_get_args(), $pluginInfo);
        }
    }

    /**
     * {@inheritdoc}
     */
    public function closeConnection($resourceName = 'default')
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'closeConnection');
        if (!$pluginInfo) {
            return parent::closeConnection($resourceName);
        } else {
            return $this->___callPlugins('closeConnection', func_get_args(), $pluginInfo);
        }
    }

    /**
     * {@inheritdoc}
     */
    public function getConnectionByName($connectionName)
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getConnectionByName');
        if (!$pluginInfo) {
            return parent::getConnectionByName($connectionName);
        } else {
            return $this->___callPlugins('getConnectionByName', func_get_args(), $pluginInfo);
        }
    }

    /**
     * {@inheritdoc}
     */
    public function getTableName($modelEntity, $connectionName = 'default')
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getTableName');
        if (!$pluginInfo) {
            return parent::getTableName($modelEntity, $connectionName);
        } else {
            return $this->___callPlugins('getTableName', func_get_args(), $pluginInfo);
        }
    }

    /**
     * {@inheritdoc}
     */
    public function getTablePlaceholder($tableName)
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getTablePlaceholder');
        if (!$pluginInfo) {
            return parent::getTablePlaceholder($tableName);
        } else {
            return $this->___callPlugins('getTablePlaceholder', func_get_args(), $pluginInfo);
        }
    }

    /**
     * {@inheritdoc}
     */
    public function getTriggerName($tableName, $time, $event)
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getTriggerName');
        if (!$pluginInfo) {
            return parent::getTriggerName($tableName, $time, $event);
        } else {
            return $this->___callPlugins('getTriggerName', func_get_args(), $pluginInfo);
        }
    }

    /**
     * {@inheritdoc}
     */
    public function setMappedTableName($tableName, $mappedName)
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'setMappedTableName');
        if (!$pluginInfo) {
            return parent::setMappedTableName($tableName, $mappedName);
        } else {
            return $this->___callPlugins('setMappedTableName', func_get_args(), $pluginInfo);
        }
    }

    /**
     * {@inheritdoc}
     */
    public function getMappedTableName($tableName)
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getMappedTableName');
        if (!$pluginInfo) {
            return parent::getMappedTableName($tableName);
        } else {
            return $this->___callPlugins('getMappedTableName', func_get_args(), $pluginInfo);
        }
    }

    /**
     * {@inheritdoc}
     */
    public function getIdxName($tableName, $fields, $indexType = 'index')
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getIdxName');
        if (!$pluginInfo) {
            return parent::getIdxName($tableName, $fields, $indexType);
        } else {
            return $this->___callPlugins('getIdxName', func_get_args(), $pluginInfo);
        }
    }

    /**
     * {@inheritdoc}
     */
    public function getFkName($priTableName, $priColumnName, $refTableName, $refColumnName)
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getFkName');
        if (!$pluginInfo) {
            return parent::getFkName($priTableName, $priColumnName, $refTableName, $refColumnName);
        } else {
            return $this->___callPlugins('getFkName', func_get_args(), $pluginInfo);
        }
    }

    /**
     * {@inheritdoc}
     */
    public function getSchemaName($resourceName)
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getSchemaName');
        if (!$pluginInfo) {
            return parent::getSchemaName($resourceName);
        } else {
            return $this->___callPlugins('getSchemaName', func_get_args(), $pluginInfo);
        }
    }

    /**
     * {@inheritdoc}
     */
    public function getTablePrefix()
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getTablePrefix');
        if (!$pluginInfo) {
            return parent::getTablePrefix();
        } else {
            return $this->___callPlugins('getTablePrefix', func_get_args(), $pluginInfo);
        }
    }
}