Back to PhocacartUtilsSettings class

Method getExtenstionsJSONLinks

public static
(mixed $type)

Method getExtenstionsJSONLinks - Source code

public static function getExtenstionsJSONLinks($type)
{
    $dir = 'https://raw.githubusercontent.com/PhocaCz/PhocaCart/master/extensions/';
    $date = new DateTime();
    $suffix = '?time=' . $date->getTimestamp();
    $a = array();
    $a['components'] = 'components/components.json' . $suffix;
    $a['modules'] = 'modules/modules.json' . $suffix;
    $a['plugins'] = 'plugins/plugins.json' . $suffix;
    $a['templates'] = 'templates/templates.json' . $suffix;
    $a['languages'] = 'languages/languages.json' . $suffix;
    $a['news'] = 'news/news.json' . $suffix;
    if (isset($a[$type])) {
        return $dir . $a[$type];
    }
    return false;
}