当前位置: 首页>>代码示例>>PHP>>正文


PHP UUID::getUUID方法代码示例

本文整理汇总了PHP中UUID::getUUID方法的典型用法代码示例。如果您正苦于以下问题:PHP UUID::getUUID方法的具体用法?PHP UUID::getUUID怎么用?PHP UUID::getUUID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UUID的用法示例。


在下文中一共展示了UUID::getUUID方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: post_createPet

 public function post_createPet()
 {
     $this->data = Input::all();
     if ($this->data["clase_mascota"] == "Mini pig") {
         $this->data["raza"] = "Mini pig";
     }
     $certificados = "";
     $vacunas = "";
     if (is_array($this->data["certificado"])) {
         foreach ($this->data["certificado"] as $key => $certificado) {
             $certificados .= $certificado . ", ";
         }
         $this->data["certificado"] = $certificados;
     } else {
         $this->data["certificado"] = "No tiene";
     }
     if (is_array($this->data["vacunas_cuales"])) {
         foreach ($this->data["vacunas_cuales"] as $key => $vacuna) {
             $vacunas .= $vacuna . ", ";
         }
         $this->data["vacunas_cuales"] = $vacunas;
     } else {
         $this->data["vacunas_cuales"] = "No tiene";
     }
     //print_r($this->data);die;
     //$this->data["raza"] = empty($this->data["perro"]) ? $this->data["gato"] : $this->data["perro"];
     //list($mes, $dia, $anio) = preg_split('/\//', $this->data["fecha_nacimiento"]);
     //$this->data["fecha_nacimiento"] = strtotime($dia."-".$mes."-".$anio);
     $this->data["uuid"] = UUID::getUUID();
     if ($this->connection->mSave($this->data)) {
         return json_encode(array("message" => "Mascota creada", "type" => 201, "error" => 0, "uuid" => $this->data["uuid"]));
     } else {
         return json_encode(array("message" => "Error al crear mascota", "type" => 500, "error" => 1));
     }
 }
开发者ID:xeneize-js,项目名称:laravel-petmatch,代码行数:35,代码来源:MascotaController.php

示例2: mSave

 public function mSave($fav)
 {
     if (is_array($fav)) {
         $fav = (object) $fav;
     }
     try {
         $this->fav_uuid = UUID::getUUID();
         $this->mi_favorito_uuid = $fav->profile;
         $this->usuario_actual = $fav->me;
         return $this->save();
     } catch (exception $e) {
         echo $e;
         die;
     }
 }
开发者ID:xeneize-js,项目名称:laravel-petmatch,代码行数:15,代码来源:FavoritosModel.php

示例3: mSave

 public function mSave($image)
 {
     try {
         if (is_array($image)) {
             $image = (object) $image;
         }
         $this->image_uuid = UUID::getUUID();
         $this->user_uuid = $image->user_uuid;
         $this->is_profile = $image->is_profile;
         $this->path = $image->path;
         return $this->save();
     } catch (exception $e) {
         return 0;
     }
 }
开发者ID:xeneize-js,项目名称:laravel-petmatch,代码行数:15,代码来源:ImageModel.php

示例4: mSave

 public function mSave($beneficio)
 {
     try {
         if (is_array($beneficio)) {
             $beneficio = (object) $beneficio;
         }
         $this->beneficio_uuid = UUID::getUUID();
         $this->user_uuid = $beneficio->user_uuid;
         $this->mascota_uuid = $beneficio->mascota_uuid;
         $this->nombre_beneficio = $beneficio->nombre_beneficio;
         $this->descripcion = $beneficio->descripcion;
         $this->confirmacion = $beneficio->confirmacion;
         $this->categoria = $beneficio->categoria;
         return $this->save();
     } catch (exception $e) {
         echo $e;
     }
 }
开发者ID:xeneize-js,项目名称:laravel-petmatch,代码行数:18,代码来源:BeneficiosModel.php

示例5: mSave

 public function mSave($message)
 {
     try {
         if (is_array($message)) {
             $message = (object) $message;
         }
         $this->mensajes_uuid = UUID::getUUID();
         $this->from_uuid = $message->from;
         $this->to_uuid = $message->to;
         $this->subject = $message->subject;
         $this->body = $message->body;
         $this->is_read = 0;
         $this->sent = $message->sent;
         return $this->save();
     } catch (exception $e) {
         echo $e;
     }
 }
开发者ID:xeneize-js,项目名称:laravel-petmatch,代码行数:18,代码来源:MensajesModel.php

示例6: mSave

 public function mSave($calendar)
 {
     try {
         if (is_array($calendar)) {
             $calendar = (object) $calendar;
         }
         $this->calendario_uuid = UUID::getUUID();
         $this->nombre_evento = $calendar->nombre_evento;
         $this->descripcion_evento = $calendar->descripcion_evento;
         $this->fecha_evento = $calendar->fecha_evento;
         $this->usuario_uuid = $calendar->user;
         if ($this->save()) {
             return 1;
         } else {
             return 0;
         }
     } catch (exception $e) {
         echo $e;
         return 0;
     }
 }
开发者ID:xeneize-js,项目名称:laravel-petmatch,代码行数:21,代码来源:CalendarioModel.php

示例7: mSave

 public function mSave($user)
 {
     try {
         if (is_array($user)) {
             $user = (object) $user;
         }
         $this->UUID_usuarios = $user->UUID;
         $this->nombre = $user->nombre;
         $this->password = Hash::make($user->password);
         $this->text_password = $user->password;
         $this->email = $user->email;
         $this->status = 0;
         $this->payment = 0;
         $this->activated_uuid = UUID::getUUID();
         if ($this->save()) {
             return 1;
         } else {
             return 0;
         }
     } catch (exception $e) {
         return $this->JSONResponse(1, $e);
     }
 }
开发者ID:xeneize-js,项目名称:laravel-petmatch,代码行数:23,代码来源:UsuariosModel.php

示例8: post_register

 public function post_register()
 {
     session_start();
     $this->data = Input::all();
     $emailExist = $this->connection->mVerifyEmail($this->data["email"]);
     try {
         if (!$emailExist) {
             $this->data["UUID"] = UUID::getUUID();
             if ($this->connection->mSave($this->data)) {
                 //logea al usuario despues de ser registrado
                 $user = $this->connection->mUserByEmail($this->data["email"]);
                 //print_r($user);die;
                 //print_r($this->data);die;
                 try {
                     $client = new Client();
                     $r = $client->post('http://dev.petmatch.club/email.php', ["body" => $this->data]);
                     $r->getBody();
                 } catch (exception $e) {
                     echo $e;
                 }
                 //$email = new Email();
                 //$email->sendEmail($this->data["email"],$this->data["nombre"]);
                 /*$credentials = array(
                       "email" => $this->data["email"],
                       "password" => $this->data["password"]
                   );
                   if (Auth::attempt($credentials)) {
                       $_SESSION["email"] = $this->data["email"];
                   }*/
                 return HTTPResponse::response(0, 201);
             }
         } else {
             return json_encode(array("error" => 1, "message" => $this->data["email"] . " ya existe", "status" => 200));
         }
     } catch (exception $e) {
         echo HTTPResponse::response(1, 500);
     }
 }
开发者ID:xeneize-js,项目名称:laravel-petmatch,代码行数:38,代码来源:UsuariosController.php


注:本文中的UUID::getUUID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。