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


PHP UUID::generate方法代码示例

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


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

示例1: save_products

function save_products($link, $prenote_uuid, $product, $id_employee, $lastUpdate)
{
    include 'config.php';
    include_once '../class.uuid.php';
    $handle = $link->prepare('INSERT INTO ' . $table_prenoteDetails . ' (ID, UUID, LastUpdate, CreationUserID, LastUpdateUserID,  OperationOnHoldUUID, ItemUUID, ItemCombinationID, ItemCombinationUUID, ItemSerialID, ItemBarcode, UnitID, Quantity, UnitPrice, SalesPersonUserID, ParentID) VALUES (0, :UUID, :last_update, :create_id, :update_id, :prenote_uuid, :ItemUUID, :combinationID, :combinationUUID, :serialID, :barcode, :unitID, :Quantity, :Price, :id_employee, 0)');
    $handle->bindParam(':UUID', $prenoteDetails_uuid);
    $handle->bindParam(':last_update', $lastUpdate);
    $handle->bindParam(':id_employee', $id_employee, PDO::PARAM_INT);
    $handle->bindParam(':create_id', $id_employee, PDO::PARAM_INT);
    $handle->bindParam(':update_id', $id_employee, PDO::PARAM_INT);
    $handle->bindParam(':prenote_uuid', $prenote_uuid);
    $handle->bindParam(':ItemUUID', $UUID);
    $handle->bindParam(':unitID', $UnitID, PDO::PARAM_INT);
    $handle->bindParam(':Quantity', $Quantity);
    $handle->bindParam(':Price', $Price);
    $handle->bindParam(':serialID', $serialID);
    $handle->bindParam(':barcode', $barcode);
    $handle->bindParam(':combinationID', $combinationID);
    $handle->bindParam(':combinationUUID', $combinationUUID);
    $lenght = count($product);
    for ($i = 0; $i < $lenght; $i++) {
        $prenoteDetails_uuid = UUID::generate(UUID::UUID_RANDOM, UUID::FMT_STRING);
        $UUID = $product[$i]->UUID;
        $Quantity = $product[$i]->Quantity;
        $Price = $product[$i]->Price;
        $UnitID = $product[$i]->UnitID;
        $serialID = $product[$i]->SerialID;
        $barcode = $product[$i]->barcode;
        $combinationID = $product[$i]->optionID;
        $combinationUUID = $product[$i]->optionUUID;
        $handle->execute();
    }
}
开发者ID:anuarml,项目名称:Prenotas-Assis,代码行数:33,代码来源:save_products.php

示例2: generateUUID

 public static function generateUUID()
 {
     $uuid = UUID::generate(UUID::UUID_RANDOM, UUID::FMT_STRING);
     while (!self::uniqueUUID($uuid)) {
         $uuid = UUID::generate(UUID::UUID_RANDOM, UUID::FMT_STRING);
     }
     return $uuid;
 }
开发者ID:ketheriel,项目名称:ETVA,代码行数:8,代码来源:EtvaNodePeer.php

示例3: testUUID

 static function testUUID()
 {
     $id = UUID::generate(UUID::UUID_TIME, UUID::FMT_STRING, 'node', 'ns');
     echo "{$id}\n";
     $id = UUID::generate(UUID::UUID_TIME, UUID::FMT_STRING, 'node', 'ns');
     echo "{$id}\n";
     $id = UUID::generate(UUID::UUID_TIME, UUID::FMT_STRING, 'node', 'ns');
     echo "{$id}\n";
     $packid = UUID::convert($id, UUID::FMT_STRING, UUID::FMT_BINARY);
     echo strlen($packid) . "\n";
     echo UUID::convert($packid, UUID::FMT_BINARY, UUID::FMT_STRING) . "\n";
 }
开发者ID:uning,项目名称:backend_common,代码行数:12,代码来源:test.php

示例4: post_products

 public function post_products()
 {
     Log::info(__METHOD__ . ": Start");
     $params = Input::param();
     $asin = $params['product_uid'];
     $obj = new Amazon_Product(Config::get('unique.amazon.public_key'), Config::get('unique.amazon.private_key'));
     $itemobj = $obj->getItemByAsin($asin);
     #Log::error(var_export($itemobj['Items'],true));
     $item = $itemobj['Items']['Item'];
     $responce = array("asin" => $item['ASIN'], "title" => $item['ItemAttributes']['Title'], "image_url" => $item['LargeImage']['URL'], "detail_url" => "", "is_adult" => isset($item['ItemAttributes']['IsAdultProduct']) ? $item['ItemAttributes']['IsAdultProduct'] : 0);
     #Log::error(var_export($responce,true));
     $ins_arr = array('id' => UUID::generate(UUID::UUID_RANDOM, UUID::FMT_STRING), 'product_uid' => $responce['asin'], 'product_type' => "amazon", 'title' => $responce['title'], 'image_url' => $responce['image_url'], 'detail_url' => $responce['detail_url'], 'is_adult' => $responce['is_adult']);
     $ins = new Model_Products($ins_arr);
     $_res = $ins->save();
     $responce = array();
     $this->response($responce, 200);
 }
开发者ID:rysk92,项目名称:Pororocca,代码行数:17,代码来源:api.php

示例5: forgotPassword

 public static function forgotPassword(Db $db, $email, $pathtoTemplates = "templates/")
 {
     if (!self::emailExists($db, $email)) {
         return false;
     }
     $siteUrl = Constants::SITE_URL;
     $siteName = Constants::SITE_NAME;
     $newPass = UUID::generate();
     $newPassHash = md5($newPass);
     $pq = "update users set passhash = ? where email like ? limit 1";
     $db->preparedQuery($pq, array($newPassHash, $email), "ss");
     $plainMessage = "Your password has been reset to:\n\n{$newPass}\n\nPlease use this temporary password to log into the site and change it to a new, secure password of your choosing on the Edit Profile page.\n\nYou can follow this link:\n{$siteUrl}" . "admin/login.php?email={$email}&from=settings.php\n\nFrom: Automailer\n";
     $htmlMessage = EmailHelper::getEmailPara("Your password has been reset to:") . EmailHelper::getEmailPara("{$newPass}") . EmailHelper::getEmailPara("Please use this temporary password to log into the site and change it to a new, secure password of your choosing on the Edit Profile page.") . EmailHelper::getEmailPara("You can follow this link: <a style='color:#6666ff;' href='{$siteUrl}" . "admin/login.php?email={$email}&from=settings.php'>{$siteUrl}" . "login.php?email={$email}&from=settings.php</a>") . EmailHelper::getEmailPara("From: Automailer");
     $tHtml = new Template($pathtoTemplates . "mailers/holder.tpl.html");
     $tHtml->insertSlot("TITLE", "{$siteName} - Forgot Password");
     $tHtml->insertSlot("CONTENT", $htmlMessage);
     // do NOT error here, the password has been reset, dont return false so they think it has not
     @EmailHelper::sendHtmlEmail($tHtml->output(), $plainMessage, Constants::EMAIL_INFO, $email, "[{$siteName}] password reset");
     return true;
 }
开发者ID:janizol,项目名称:APS,代码行数:20,代码来源:userhelper.class.php

示例6: verify_upload

 public function verify_upload()
 {
     require APPPATH . 'libraries/uuid.php';
     $_uuid = UUID::generate();
     $_description = $this->input->post('inputDescription');
     $_folder = $this->input->post('inputFolder');
     if (!empty($_description)) {
         $_description = addslashes($_description);
     }
     if (!isset($_folder) || empty($_folder) || $_folder == '0') {
         $_folder = NULL;
     }
     $_added = $this->mPubuploads->createUpload(array('uploadUUID' => $_uuid, 'uploadMessage' => $_description, 'defaultFolderID' => $_folder));
     if ($_added) {
         $_errortype = 'success';
         $_errormsg = __('uploads_msg_addedsuccess');
         $this->mGlobal->log(array('type' => "info", 'message' => "Download request with id '{$_uuid}' created by user '{$this->session->userdata['companyName']}'.", 'size' => NULL));
     } else {
         $_errortype = 'error';
         $_errormsg = __('uploads_msg_addederror');
         $this->mGlobal->log(array('type' => "error", 'message' => "Download request with id '{$_uuid}' from user '{$this->session->userdata['companyName']}' could not be created.", 'size' => NULL));
     }
     redirect('admin/pubuploads/all_entries?errortype=' . $_errortype . '&errormsg=' . urlencode($_errormsg));
 }
开发者ID:StudsPro,项目名称:islandpeeps.com,代码行数:24,代码来源:pubuploads.php

示例7: execute

 protected function execute($arguments = array(), $options = array())
 {
     // Context
     $context = sfContext::createInstance(sfProjectConfiguration::getApplicationConfiguration('app', $options['env'], true));
     // initialize the database connection
     $databaseManager = new sfDatabaseManager($this->configuration);
     $connection = $databaseManager->getDatabase($options['connection'])->getConnection();
     // add your code here
     // server id
     $server = $arguments['server'];
     $this->log("[INFO] Check status of server '{$server}'");
     $etva_server = EtvaServerPeer::retrieveByPK($server);
     if (!$etva_server) {
         $etva_server = EtvaServerPeer::retrieveByUuid($server);
     }
     if (!$etva_server) {
         $etva_server = EtvaServerPeer::retrieveByName($server);
     }
     if (!$etva_server) {
         $msg_i18n = $context->getI18N()->__(EtvaServerPeer::_ERR_NOTFOUND_, array('name' => $server));
         $error = array('success' => false, 'agent' => sfConfig::get('config_acronym'), 'error' => $msg_i18n, 'info' => $msg_i18n);
         $this->log("[ERROR] " . $error['error']);
         return $error;
     } else {
         if ($nid = $options['node']) {
             $etva_node = EtvaNodePeer::retrieveByPK($nid);
         } else {
             $etva_node = $etva_server->getEtvaNode();
         }
         /*if(!$etva_node){
         
                     //notify event log
                     $msg_i18n = Etva::makeNotifyLogMessage(sfConfig::get('config_acronym'),
                                                                             EtvaNodePeer::_ERR_NOTFOUND_ID_, array('id'=>$nid));
                     $error = array('success'=>false,'agent'=>sfConfig::get('config_acronym'),'error'=>$msg_i18n,'info'=>$msg_i18n);
         
                     $this->log("[ERROR] ".$error['error']);
                     return $error;
                 }
         
                 $server_va = new EtvaServer_VA($etva_server);
                 $response = $server_va->getGAInfo($etva_node);   // update GA Info
                 */
         // TODO force check
         $response = array('success' => true, 'response' => 'check ok', 'agent' => sfConfig::get('config_acronym'));
         if ($etva_node) {
             $response['agent'] = $etva_node->getName();
         }
         if ($options['check']) {
             if (!$options['request_id']) {
                 $options['request_id'] = UUID::generate(UUID::UUID_RANDOM, UUID::FMT_STRING);
             }
             $response['_request_id'] = $options['request_id'];
             $response['_request_status'] = EtvaAsynchronousJob::PENDING;
             if ($etva_server->getVmState() == $options['check']) {
                 $response['_request_status'] = EtvaAsynchronousJob::FINISHED;
                 $msg_ok_type = '';
                 if ($options['check'] == EtvaServer::STATE_RUNNING) {
                     $msg_ok_type = EtvaServerPeer::_OK_START_;
                 } elseif ($options['check'] == EtvaServer::STATE_STOP) {
                     $msg_ok_type = EtvaServerPeer::_OK_STOP_;
                 }
                 if ($msg_ok_type) {
                     $response['response'] = Etva::makeNotifyLogMessage($response['agent'], $msg_ok_type, array('name' => $etva_server->getName()), null, array(), EtvaEventLogger::INFO);
                 }
             }
             //$this->log("[DEBUG] status=".$response['_request_status']." state=".$etva_server->getVmState()." == ".$options['check']);
         }
         if ($response['success']) {
             $this->log("[INFO] " . $response['response']);
             //$this->log("[DEBUG ".print_r($response,true));
         } else {
             $this->log("[ERROR] " . $response['error']);
         }
         return $response;
     }
 }
开发者ID:ketheriel,项目名称:ETVA,代码行数:77,代码来源:serverCheckTask.class.php

示例8: post

 public function post()
 {
     $dbw = wfGetDB(DB_MASTER);
     if (!$this->id) {
         $this->id = UUID::generate();
     }
     $dbw->insert('FlowThread', array('flowthread_id' => $this->id->getBin(), 'flowthread_pageid' => $this->pageid, 'flowthread_userid' => $this->userid, 'flowthread_username' => $this->username, 'flowthread_text' => $this->text, 'flowthread_parentid' => $this->parentid ? $this->parentid->getBin() : null, 'flowthread_status' => $this->status, 'flowthread_like' => $this->favorCount, 'flowthread_report' => $this->reportCount));
     global $wgTriggerFlowThreadHooks;
     if ($wgTriggerFlowThreadHooks) {
         \Hooks::run('FlowThreadPosted', array($this));
     }
 }
开发者ID:moegirlwiki,项目名称:MW-FlowThread,代码行数:12,代码来源:Post.php

示例9: json_decode

 $prenote = json_decode($json_prenote);
 $saved = false;
 $printed = false;
 if (!$prenote->folio) {
     $date = new DateTime();
     $prenote->date = $date->format('Y-m-d H:i:s');
     $mcs = explode('.', microtime(true));
     $ms = substr($mcs[1], 0, 3);
     //date format for sqlite
     //$lastUpdate = $date->format('Y-m-d H:i:s.'.$ms);
     //date format for sqlsrv
     $lastUpdate = $date->format('Y-m-d H:i:s.' . $ms);
     $dte = $date->format('Y-m-d');
     $tme = $date->format('H:i:s.' . $ms);
     //$code = $date->format('YmdHis'.$ms);
     $prenote_uuid = UUID::generate(UUID::UUID_RANDOM, UUID::FMT_STRING);
     $link = new PDO($db_url, $user, $password, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
     $st = $link->query('SELECT Consecutivo FROM ThoConsecutivo WHERE Tipo = \'PRENOTA\'');
     if (!($result = $st->fetch())) {
         throw new PDOException('Error al obtener el folio de la prenota.');
     }
     $code = $result['Consecutivo'];
     $link->query('UPDATE ThoConsecutivo SET Consecutivo = Consecutivo + 1 WHERE Tipo = \'PRENOTA\'');
     $terminalCode = ord($prenote->terminal);
     $code = generate_barcode(true, $code, $terminalCode);
     $link->beginTransaction();
     $handle = $link->prepare('INSERT INTO ' . $table_prenote . ' (ID, UUID, LastUpdate, CreationUserID, LastUpdateUserID, Type, TypeDescription, Dte, Tme, StoreID, Workstation, Code, CustomerUUID, SalesPersonUserID, Total, Quantity, Reference, Comment) VALUES (:id, :UUID, :lastUpdate, :create_id, :update_id, 1, :type_description, :dte, :tme, :store_id, :workstation, :code, :customer_id, :id_employee, :total, :narticles, :reference, :comment)');
     //$handle = $link->prepare( ' INSERT INTO ' .$table_prenote. ' ( [ID], [UUID], [LastUpdate], [CreationUserID], [LastUpdateUserID], [Type], [TypeDescription], [Dte], [Tme], [StoreID], [Workstation], [Code], [SalesPersonUserID], [Total], [Quantity] ) VALUES ( 0, :UUID, :lastUpdate, :create_id, :update_id, 1, :type_description, :dte, :tme, 2, :workstation, :code, :id_employee, :total, :narticles ) ' );
     $handle->bindParam(':UUID', $prenote_uuid);
     $handle->bindParam(':lastUpdate', $lastUpdate);
     $handle->bindParam(':dte', $dte);
开发者ID:anuarml,项目名称:Prenotas-Assis,代码行数:31,代码来源:save_ticket.php

示例10: _adoptRemote

 protected function _adoptRemote($iri, $parent, $ownerScheme, $ownerUUID)
 {
     $uuid = UUID::generate();
     $this->db->insert('cluster_fs_object', array('cluster_name' => $parent['cluster_name'], 'fsobject_uuid' => $uuid, 'fsobject_parent' => $parent['fsobject_uuid'], 'fsobject_name' => null, 'fsobject_cname' => null, 'fsobject_dev' => 0, 'fsobject_ino' => 0, 'fsobject_mode' => 0120666, 'fsobject_nlink' => 1, 'fsobject_uid' => 0, 'fsobject_gid' => 0, 'fsobject_rdev' => 0, 'fsobject_size' => 0, '@fsobject_ctime' => $this->db->now(), '@fsobject_mtime' => $this->db->now(), 'fsobject_atime' => null, 'fsobject_blksize' => 4096, 'fsobject_blocks' => 0, 'fsobject_creator_scheme' => $ownerScheme, 'fsobject_creator_uuid' => $ownerUUID, 'fsobject_modifier_scheme' => $ownerScheme, 'fsobject_modifier_uuid' => $ownerUUID, 'fsobject_virtual' => 'N', 'fsobject_deleted' => 'N', 'fsobject_remote' => $iri));
     return $uuid;
 }
开发者ID:nexgenta,项目名称:cluster,代码行数:6,代码来源:clusterfs.php

示例11: F_GBI


//.........这里部分代码省略.........
            print "</CENTER>\n";
        }
        if ($sAction == "CREATEDATASET") {
            $sFilterValueNew = @$_POST["NEW"];
            $sFilterValueSNew = @$_POST["SNEW"];
            $sFilterValueCopy = @$_POST["COPY"];
            $sFilterValueNCopy = @$_POST["NCOPY"];
            if ($sFilterValueNew != "" and $sFilterValueNew != NULL and $sFilterValueSNew != "" and $sFilterValueSNew != NULL) {
                print "<div id=\"nav_path\">\n";
                print "<span>> <a href=\"index.php\"> Hoofdmenu</a> > Dataset aanmaken </span>\n";
                print "</div>\n";
                print "<BR><BR><BR>\n";
                print "<CENTER>\n";
                print "<TABLE BORDER=\"0\" CELLSPACING=\"10\">\n";
                print "<TR><TD VALIGN=\"MIDDLE\" WIDTH=\"600px\" ID=\"kopbegin\">\n";
                print "<CENTER>Dataset aanmaken</CENTER>\n";
                print "</TD></TR></TABLE></CENTER>\n";
                print "<BR>\n";
                print "<CENTER>\n";
                print "<TABLE BORDER=\"0\" CELLSPACING=\"10\">\n";
                print "<TR><TD ALIGN=\"LEFT\" VALIGN=\"MIDDLE\" WIDTH=\"600px\">\n";
                $sMax = F_SELECTRECORD("SELECT MAX(DATACODE) FROM DATASET");
                $sMax = $sMax + 1;
                $sMaxTekst = F_SELECTRECORD("SELECT MAX(CODE) FROM MEMOTABEL");
                $sMaxTekst = $sMaxTekst + 1;
                if ($sFilterValueSNew == "Dataset") {
                    $sSoortType = 1;
                } elseif ($sFilterValueSNew == "CD/DVD") {
                    $sSoortType = 2;
                } else {
                    $sSoortType = 3;
                }
                //genereren van fileidentifier UUID (ISO nr. 207)
                $sha1 = UUID::generate(UUID::UUID_NAME_SHA1, UUID::FMT_STRING, $sFilterValueNew, 'www.drenthe.info');
                //generenen van bronidentifier UUID (ISO nr. 2)
                $sha2 = UUID::generate(UUID::UUID_NAME_SHA1, UUID::FMT_STRING, 'provincie drenthe', 'www.drenthe.info');
                F_CREATERECORD("INSERT INTO DATASET (DATACODE, DATASET_TITEL, OMSCHRIJVING_CODE, TYPE, TAAL, KARAKTERSET, METADATASTD, VERSIE_METASTD, CODE_REF, ORG_NAMESPACE, UUIDBRON, UUID) VALUES ('" . $sMax . "', '" . $sFilterValueNew . "', '" . $sMaxTekst . "', '" . $sSoortType . "', 'dut', 'utf8', 'ISO 19115', 'Nederlandse metadata profiel op ISO 19115 voor geografie 1.2', '28992', 'EPSG', '" . $sha2 . "', '" . $sha1 . "')");
                if ($sSoortType == 1) {
                    F_CREATERECORD("INSERT INTO GEOGRAFISCH (DATACODE) VALUES ('" . $sMax . "')");
                }
                F_CREATERECORD("INSERT INTO MEMOTABEL (CODE) VALUES ('" . $sMaxTekst . "')");
                $sMaxTekst = $sMaxTekst + 1;
                if ($sSoortType == 1) {
                    F_CREATERECORD("INSERT INTO ITEMS (DATACODE, VOLGNR, DOMEIN) VALUES ('" . $sMax . "', '1', '" . $sMaxTekst . "')");
                    F_CREATERECORD("INSERT INTO MEMOTABEL (CODE) VALUES ('" . $sMaxTekst . "')");
                }
                print "Dataset " . $sFilterValueNew . " met succes aangemaakt.<BR>";
                print "<A HREF='?e=@GBI&p=DATASETEDIT|" . $sMax . "'>Klik hier om de metagegevens van de dataset te bewerken</A>";
                print "<BR>\n";
                print "<BR>\n";
                print "<BR>\n";
                print "<BR>\n";
                print "<BR>\n";
                print "<BR>\n";
                print "<BR>\n";
                print "<BR>\n";
                print "<BR>\n";
                print "<BR>\n";
                print "<BR>\n";
                print "<BR>\n";
                print "<BR>\n";
                print "</TD></TR></TABLE>\n";
                print "</CENTER>\n";
            }
            if ($sFilterValueCopy != "" and $sFilterValueCopy != NULL and $sFilterValueNCopy != "" and $sFilterValueNCopy != NULL) {
                print "<div id=\"nav_path\">\n";
开发者ID:richdb,项目名称:GDB-Metadataeditor,代码行数:67,代码来源:index.php

示例12: __construct

 public function __construct($steamDocument = null)
 {
     if ($steamDocument && $steamDocument->get_attribute("DOC_FILE_PERSISTENCE") === 1) {
         $this->uuid = $steamDocument->get_content_internal();
         $this->folder = FILE_PERSISTENCE_PATH . $uuid[0] . "/" . $uuid[1] . "/" . $uuid[2] . "/" . $uuid[3] . "/" . $uuid[4] . "/" . $uuid[5] . "/" . $uuid[6] . "/" . substr($uuid, 7) . "/";
         $this->fileContent = $folder . "content";
     } else {
         $this->uuid = UUID::generate(UUID::UUID_RANDOM, UUID::FMT_STRING);
     }
     $this->folder = FILE_PERSISTENCE_PATH . $uuid[0] . "/" . $uuid[1] . "/" . $uuid[2] . "/" . $uuid[3] . "/" . $uuid[4] . "/" . $uuid[5] . "/" . $uuid[6] . "/" . substr($uuid, 7) . "/";
     $this->fileContent = $this->folder . "content";
     $this->fileIds = $this->folder . "ids";
 }
开发者ID:rolwi,项目名称:koala,代码行数:13,代码来源:FilePersistence.class.php

示例13: createClassificationPath

 public function createClassificationPath($scheme, $path)
 {
     $parent = $scheme->uuid;
     $kind = $scheme->singular;
     $path = explode('/', $path);
     foreach ($path as $p) {
         if (!strlen($p)) {
             continue;
         }
         $rs = $this->query(array('kind' => $kind, 'parent' => $parent, 'tag' => $p, 'limit' => 1));
         if ($rs->EOF && $parent == $scheme->uuid) {
             $rs = $this->query(array('kind' => $kind, 'parent' => null, 'tag' => $p, 'limit' => 1));
         }
         $data = $rs->next();
         if ($data) {
             if (!isset($data->title) && isset($data->slug)) {
                 $data->title = ucwords($data->slug);
                 $data['parent'] = $parent;
                 $data->store();
             }
             $parent = $data->uuid;
             continue;
         }
         $data = array('uuid' => UUID::generate(), 'kind' => $kind, 'parent' => $parent, 'slug' => $p);
         if ($parent !== null) {
             $data['_refs'][] = 'parent';
         }
         $this->setData($data);
         $parent = $data['uuid'];
     }
     return $parent;
 }
开发者ID:nexgenta,项目名称:media,代码行数:32,代码来源:model.php

示例14: checkid

 /**
  * 检查行id,无自动生成
  * @param $type
  * @param $data
  * @param $id
  * @param $idname
  * @return unknown_type
  */
 protected function checkid($type, &$data, $id = null, $idname = 'id')
 {
     if (!$id) {
         $id = $data[$idname];
         if (!$id) {
             if ($type == self::CT_TimeUUIDType || $type == self::CT_LexicalUUIDType) {
                 $id = UUID::generate(UUID::UUID_TIME, UUID::FMT_STRING, $this->column_family, $this->column_type);
             } else {
                 $id = uniqid();
             }
         }
     }
     $data[$idname] = $id;
     // unset($data[$idname]);
     return $id;
 }
开发者ID:uning,项目名称:backend_common,代码行数:24,代码来源:phpcassa.php

示例15:

echo $GENERATED;
?>
</textarea></div></td>
      </tr>
    </table></td>
  </tr>
</table>
<BR>
<?
}
?>
<form name="form1" method="POST" action="index.php?page=region-generate">
<TABLE width="80%" border=0 align=center cellpadding="0" cellspacing="0">
   <TR>
      <TD width="221" height="40" align="center" valign="bottom" background="images/main/regions_middle.jpg"><b>Region UUID</b></a></TD>
	  <TD width="221" height="40" align="center" valign="bottom" background="images/main/regions_middle.jpg"><b><input type=text name=region_uuid size=80 readonly value=<?$str = UUID::generate(UUID::UUID_TIME, UUID::FMT_STRING, "osgrid");echo $str;?>></b></a></TD>
    </TR>
    <TR style='BACKGROUND-COLOR: #e8eff5'>
      <TD width="221" height="40" align="center" valign="middle" bgcolor="#FFFFFF"><b>Region - Name</b></a></TD>
      <TD width="221" height="40" align="center" valign="middle" bgcolor="#FFFFFF"><input type=text name=region_name size=80></TD>
	</TR>
    <TR style='BACKGROUND-COLOR: #e8eff5'>
      <TD width="221" height="40" align="center" valign="middle" bgcolor="#FFFFFF"><b>Region - Location X</b></a></TD>
      <TD width="221" height="40" align="center" valign="middle" bgcolor="#FFFFFF"><input type=text name=region_location_x size=80></TD>
	</TR>
    <TR style='BACKGROUND-COLOR: #e8eff5'>
      <TD width="221" height="40" align="center" valign="middle" bgcolor="#FFFFFF"><b>Region - Location Y</b></a></TD>
      <TD width="221" height="40" align="center" valign="middle" bgcolor="#FFFFFF"><input type=text name=region_location_y size=80></TD>
	</TR>
    <TR style='BACKGROUND-COLOR: #e8eff5'>
      <TD width="221" height="40" align="center" valign="middle" bgcolor="#FFFFFF"><b>Region - IP Port</b></a></TD>
开发者ID:RitsuTainaka,项目名称:Slackdog-OpenSim-Admin,代码行数:31,代码来源:region-generate.php


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