Beispiel #1
0
 /**
  * Register user
  *
  * @param $identify
  * @param $username
  * @param $client
  * @param $dni
  * @param $name
  * @param $lastname
  * @param $email
  * @return mixed|string
  */
 public static function userRegister($identify, $username, $client, $dni, $name, $lastname, $email)
 {
     $access_token = Route::input('fantasy_token') ? Route::input('fantasy_token') : Session::get('fantasy_token');
     if (is_null($access_token)) {
         $token = self::getAccessToken();
         $access_token = $token->FantasyApi->data->access_token;
     }
     try {
         $url = Config::get('fantasy.fantasy_url');
         $request = ['access_token' => $access_token, 'action' => 'USER', 'method' => 'REGISTER', 'identify' => $identify, 'username' => $username, 'client' => $client, 'dni' => $dni, 'name' => $name, 'lastname' => $lastname, 'email' => $email];
         $curl = cURL::post($url, $request);
         $response = json_decode($curl);
     } catch (\Exception $ex) {
         \Log::error('FantasyWrapper.userRegister.catch', ['exception' => $ex, 'identify' => $identify, 'username' => $username, 'client' => $client, 'dni' => $dni, 'name' => $name, 'lastname' => $lastname, 'email' => $email, 'access_token' => $access_token]);
         $response = $ex->getMessage();
     }
     return $response;
 }
 /**
  * 删除配置 
  *
  * @return string
  */
 public function delete()
 {
     $param = array('author' => $_POST['name'], 'module' => $_POST['module'], 'action' => $_POST['action'], 'framework' => $_POST['framework'], 'switch' => $_POST['swi']);
     $url = self::DEV_HOST . '/2.0/order/xhprof_config_delete';
     $response = cURL::post($url, $param);
 }
 public function xhprof_detail($id)
 {
     $response = cURL::get(parent::DEV_HOST . '/2.0/order/xhprof_detail_diy?uniqid=' . $id);
     $xhprofData = json_decode($response->body, 1);
     return $xhprofData;
 }
 /**
  * Xhprof Performance Analysis(snake)
  *
  * @return Response
  */
 public function snake_xhprof($page = 0)
 {
     $response = cURL::get(parent::DEV_HOST . '/2.0/order/xhprof_list?type=snake&page=' . $page);
     $data = json_decode($response->body);
     return view('xhprof_snake', ['xhprofData' => $data->data, 'current' => 'Snake analysis', 'tab' => 'snake']);
 }