<?php

namespace Openguru\OpenCartFramework\OpenCart\Decorators;

use Cart\Cart;
use Cart\Currency;
use Config;
use Language;
use Loader;
use ModelCatalogCategory;
use ModelCatalogProduct;
use ModelDesignBanner;
use ModelSettingSetting;
use ModelToolImage;
use Registry;
use Session;
use Url;

/**
 * @property Loader $load
 * @property Cart $cart
 * @property Session $session
 * @property Currency $currency
 * @property Config $config
 * @property Url $url
 * @property Language $language
 * @property ModelToolImage $model_tool_image
 * @property ModelCatalogProduct $model_catalog_product
 * @property ModelSettingSetting $model_setting_setting
 * @property ModelDesignBanner $model_design_banner
 * @property ModelCatalogCategory $model_catalog_category
 * @property Registry $registry
 */
class OcRegistryDecorator
{
    private Registry $registry;

    public function __construct(Registry $registry)
    {
        $this->registry = $registry;
    }

    public function __get($key)
    {
        return $this->registry->get($key);
    }

    public function __set($key, $value)
    {
        $this->registry->set($key, $value);
    }

    public function __isset($key)
    {
        return $this->registry->has($key);
    }
}
