<?php

namespace ThurData\Servers\KerioEmail\App\Helpers;


/**
 *
 * Created by PhpStorm.
 * User: ThurData
 * Date: 05.09.19
 * Time: 14:14
 * Class Storage
 */
class Storage
{
    /**
     * @var array
     */
    protected $data = [];

    /**
     * @param $key
     * @param $value
     * @return $this
     */
    public function set($key, $value)
    {
        $this->data[$key] = $value;
        return $this;
    }

    /**
     * @param $key
     * @return bool
     */
    public function exists($key)
    {
        return isset($this->data[$key]);
    }

    /**
     * @param $key
     */
    public function remove($key)
    {
        unset($this->data[$key]);
    }

    /**
     * @param $key
     * @return mixed
     */
    public function get($key)
    {
        return $this->data[$key];
    }
}