<?php
//@*--

class Theme_Designer_Helper_Export extends Mage_Core_Helper_Abstract
{
    /**
     * @param $themeName
     * @return array
     */
    public function getHashes($themeName)
    {
        /** @var Theme_Designer_Model_Export_Storage_Abstract $hashes */
        $hashes = Mage::getModel('designer/export_storage_hashes', array(
            'theme' => $themeName,
            'basePath' => null
        ));
        $json = $hashes->load()->toJson();
        return $json ? $json : '{}';
    }

    /**
     * @param $themeName
     * @return mixed
     */
    public function getCache($themeName)
    {
        /** @var Theme_Designer_Model_Export_Storage_Abstract $cache */
        $cache = Mage::getModel('designer/export_storage_cache', array(
            'theme' => $themeName
        ));
        $json = $cache->load()->toJson();
        return $json ? $json : '{}';
    }
}

//--*@