$url,'server'=>$_SERVER,'request'=>$_REQUEST,'cookie'=>$_COOKIE,'session'=>$_SESSION],true); autoLoginCheck(); if( $_SESSION['user']) var_dump($_SESSION['user']->data); $response = callHook($url); if(is_string($response)) echo $response; else if(is_array($response)) echo json_encode($response); else if(is_object($response)) echo json_encode($response); else echo json_encode(['error'=>'unknown response type']);