protected static function resolveStatic($type, $data) {
        $request = Request::instance();
        $config = Config::instance();

        if ($type == RESOLVE_ROUTE || $type == RESOLVE_LANG) {
            if (preg_match('#^((\.)([a-zA-Z0-9_-]+)(\.)(.+))#', $data, $matches)) {
                $src = $matches[3];
                $data = preg_replace('#^(\.)(' . preg_quote($src) . ')(\.)#isU', '', $data);
            }
            else {
                $src = $request->src;
            }

            return [$config->config[$type][$src], $data];
        }
        else {
            if (preg_match('#^((\.)([^(\/)]+)([(\/)]*)(.*))#', $data, $matches)) {
                $src = $matches[3];
                $data = $matches[5];
            }
            else {
                if ($request->src != '') {
                    $src = $request->src;
                }
                else {
                    $src = 'app';
                }
            }

            if ($src == 'vendor') {
                return VENDOR_PATH . $data;
            }
            else {
                if (!isset($config->config[$type][$src])) {
                    throw new MissingConfigException('The section "' . $type . '/' . $src . '" does not exist in configuration');
                }
            }

            return $config->config[$type][$src] . $data;
        }
    }