Interceptor.php 1.86 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
<?php
namespace Magento\Framework\App\MaintenanceMode;

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

    public function __construct(\Magento\Framework\Filesystem $filesystem)
    {
        $this->___init();
        parent::__construct($filesystem);
    }

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

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

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

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