當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UUID::isBinary方法代碼示例

本文整理匯總了PHP中UUID::isBinary方法的典型用法代碼示例。如果您正苦於以下問題:PHP UUID::isBinary方法的具體用法?PHP UUID::isBinary怎麽用?PHP UUID::isBinary使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在UUID的用法示例。


在下文中一共展示了UUID::isBinary方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: addSuper

 /**
  * Helper function to add a Super Column instance to this Super Column Family
  * addSuper overrides the parent container reference in the object instance
  * To add the same supercolumn instance to multiple columnfamilies, use object clones
  * instead.
  * @param PandraSuperColumn $scObj
  * @return PandraSuperColumn
  */
 public function addSuper(PandraSuperColumn $scObj)
 {
     $superName = $scObj->getName();
     if ($this->getType() == self::TYPE_UUID && !UUID::isBinary($scObj->getName())) {
         $scObj->setName(UUID::convert($scObj->getName(), UUID::UUID_FMT_BIN));
     }
     $scObj->setParent($this, false);
     $this->_columns[$superName] = $scObj;
     return $this->getColumn($superName);
 }
開發者ID:jlaprise,項目名稱:Pandra,代碼行數:18,代碼來源:SuperColumnFamily.class.php

示例2: columnIn

 /**
  * Determins if column name exists in children at depth 1
  * @param string $columnName column name
  * @return bool column exists
  */
 public function columnIn($columnName)
 {
     if (UUID::isBinary($columnName)) {
         $columnName = UUID::convert($columnName, UUID::UUID_FMT_STR);
     }
     return array_key_exists($columnName, $this->_columns);
 }
開發者ID:jlaprise,項目名稱:Pandra,代碼行數:12,代碼來源:ColumnContainer.class.php

示例3: unparse_column_name

 protected static function unparse_column_name($column_name, $type = CassandraCF::CT_BytesType)
 {
     if (!$column_name) {
         return NULL;
     }
     if (UUID::isBinary($column_name)) {
         return $column_name;
     }
     if ($type == self::CT_TimeUUIDType || $type == self::CT_LexicalUUIDType) {
         return UUID::convert($column_name, UUID::FMT_STRING, UUID::FMT_BINARY);
     } else {
         if ($type == self::CT_LongType) {
             return pack("N2", $column_name, 0);
             // FIXME: currently only supports 32 bit unsigned
         } else {
             return $column_name;
         }
     }
 }
開發者ID:uning,項目名稱:backend_common,代碼行數:19,代碼來源:phpcassa.php


注:本文中的UUID::isBinary方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。