<?php
namespace ModulesGarden\ProxmoxAddon\App\Decorators;

class OsTemplateDecorator
{

    protected $name;

    /**
     * OsTemplateDecorator constructor.
     * @param $name
     */
    public function __construct($name)
    {
        $this->name = $name;
    }

    public function toFriendlyName(){
        $ex           = explode("/", $this->name);
        $friendlyName = end($ex);
        $s            = array("-", "_", ".tar.gz", ".iso", '.tar.xz');
        $r            = array(" ", " ", "", "", "");
        $friendlyName = str_replace($s, $r, $friendlyName);
        $friendlyName = ucwords($friendlyName);
        return $friendlyName;
    }


}