<?php

namespace App\Http\Controllers\Owner\Provider;

class ProviderMap
{

    private $map = [];

    public function __construct()
    {
    }

    public function add($key, $value)
    {
        $this->map[$key] = $value;
    }

    public function appendAttribute($key, $attribute, $value)
    {
        if (isset($this->map[$key])) {
            $this->map[$key]->$attribute = $value;
        }
    }

    public function values()
    {
        return array_values($this->map);
    }
}