Home Reference Source

application/config.js

/**
 * I'm generated automatically by the application. Please don't manually
 * edit me.
 */
import React from 'react';
const Config = {
	PHALCON: "3.0.0",
	REACT: React.version,
	APPID: "ceo-core",

    set(k, v) {
        if (!this.stack) {
            this.stack = {};
        }

        this.stack[k] = v;
    },

    get(k) {
        if (k == 'publication_srn') {
            return 'srn::publication:' + this.stack['publication_id'];
        }
        if (k == 'cclicense') {
            return this.stack['ccl'];
        }
        if (k == 'debug') {
            return window && window._app_debug ? true : false;
        }
        return this.stack[k];
    }
}

const conf = window._app_config;
if (conf) {
    for (let k in conf) {
        Config.set(k, conf[k]);
    }
}

export default Config;