<?php

namespace Mnv\Models;

use Mnv\Core\Filesystem\Filesystem;

/**
 * Class Templates
 * @package Mnv\Models
 */
class Templates
{
    /**
     * TemplatesAdmin constructor.
     */
    public function __construct() {}


    /**
     * @param $template
     * @return bool
     */
    public function save($template): bool
    {
        $filesystem = new Filesystem();
        if ($filesystem->put(THEME_ROOT.'/templates/'.$template['fileName'], $template['content'])) {
            return true;
        }

        return false;
    }

}