public static function logConsole($en = true) { self::$logConsole = $en; }
header("Access-Control-Allow-Methods: HEAD, GET, OPTIONS, POST, DELETE, PATCH"); header("Access-Control-Allow-Headers: Authorization, X-Requested-With, Origin, Accept, Content-Type"); header("Access-Control-Expose-Headers: Authorization, X-Requested-With, Origin, Accept, Content-Type"); $profiling = microtime(true); error_log("Time START : ======> " . (microtime(true) - $profiling)); function ss($a, $b) { $a1 = $a->get('statistics', 0); $b1 = $b->get('statistics', 0); // echo "Compare " . $a1 . " with " . $b1; exit; if ($a1 === $b1) { return 0; } return $a1 < $b1 ? 1 : -1; } DiscoUtils::logConsole(false); try { $apiconfig = json_decode(file_get_contents(dirname($BASE) . '/etc/apiconfig.json'), TRUE); $response = null; $parameters = null; $body = null; if (DiscoUtils::route('options', '.*', $parameters)) { header('Content-Type: application/json; charset=utf-8'); exit; } $store = new DiscoStore(); $logocache = new LogoCache(); if (DiscoUtils::route('get', '^/logo/([^/]+)$', $parameters, $qs)) { // echo "We found logo " . $parameters[0]; $logostore = new LogoStore('feide'); $id = $parameters[1];