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


PHP Memcached_DataObject::staticGet方法代碼示例

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


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

示例1: staticGet

 /**
  * Fetch a Magicsig object from the cache or database on a field match.
  *
  * @param string $k
  * @param mixed $v
  * @return Magicsig
  */
 public function staticGet($k, $v = null)
 {
     $obj = parent::staticGet(__CLASS__, $k, $v);
     if (!empty($obj)) {
         $obj = Magicsig::fromString($obj->keypair);
         // Double check keys: Crypt_RSA did not
         // consistently generate good keypairs.
         // We've also moved to 1024 bit keys.
         if (strlen($obj->publicKey->modulus->toBits()) != 1024) {
             $obj->delete();
             return false;
         }
     }
     return $obj;
 }
開發者ID:microcosmx,項目名稱:experiments,代碼行數:22,代碼來源:Magicsig.php

示例2: staticGet

 public function staticGet($k, $v = null)
 {
     return Memcached_DataObject::staticGet('Irc_waiting_message', $k, $v);
 }
開發者ID:harriewang,項目名稱:InnertieWebsite,代碼行數:4,代碼來源:Irc_waiting_message.php

示例3: staticGet

 function staticGet($k, $v = NULL)
 {
     return Memcached_DataObject::staticGet('File', $k, $v);
 }
開發者ID:Br3nda,項目名稱:StatusNet,代碼行數:4,代碼來源:File.php

示例4: staticGet

 function staticGet($k, $v = null)
 {
     return Memcached_DataObject::staticGet('Notice_tag', $k, $v);
 }
開發者ID:Br3nda,項目名稱:laconica,代碼行數:4,代碼來源:Notice_tag.php

示例5: staticGet

 /**
  * Get an instance by key
  *
  * This is a utility method to get a single instance with a given key value.
  *
  * @param string $k Key to use to lookup (usually 'user_id' for this class)
  * @param mixed  $v Value to lookup
  *
  * @return User_greeting_count object found, or null for no hits
  *
  */
 function staticGet($k, $v = null)
 {
     return Memcached_DataObject::staticGet('Bookmark', $k, $v);
 }
開發者ID:microcosmx,項目名稱:experiments,代碼行數:15,代碼來源:Bookmark.php

示例6: staticGet

 public function staticGet($k, $v = null)
 {
     return parent::staticGet(__CLASS__, $k, $v);
 }
開發者ID:microcosmx,項目名稱:experiments,代碼行數:4,代碼來源:Ostatus_profile.php

示例7: staticGet

 /**
  * Get an instance by key
  *
  * This is a utility method to get a single instance with a given key value.
  *
  * @param string $k Key to use to lookup (usually 'user_id' for this class)
  * @param mixed  $v Value to lookup
  *
  * @return User_followeveryone_prefs object found, or null for no hits
  */
 function staticGet($k, $v = null)
 {
     return Memcached_DataObject::staticGet('User_followeveryone_prefs', $k, $v);
 }
開發者ID:microcosmx,項目名稱:experiments,代碼行數:14,代碼來源:User_followeveryone_prefs.php

示例8: staticGet

 /**
  * Get an instance by key
  *
  * This is a utility method to get a single instance with a given key value.
  *
  * @param string $k Key to use to lookup
  * @param mixed  $v Value to lookup
  *
  * @return Yammer_state object found, or null for no hits
  */
 function staticGet($k, $v = null)
 {
     return Memcached_DataObject::staticGet('Yammer_state', $k, $v);
 }
開發者ID:Grasia,項目名稱:bolotweet,代碼行數:14,代碼來源:Yammer_state.php

示例9: staticGet

 /**
  * Get an instance by key
  *
  * This is a utility method to get a single instance with a given key value.
  *
  * @param string $k Key to use to lookup
  * @param mixed  $v Value to lookup
  *
  * @return QnA_Vote object found, or null for no hits
  *
  */
 function staticGet($k, $v = null)
 {
     return Memcached_DataObject::staticGet('QnA_Vote', $k, $v);
 }
開發者ID:Grasia,項目名稱:bolotweet,代碼行數:15,代碼來源:QnA_Vote.php

示例10: staticGet

 /**
  * Get an instance by key
  *
  * @param string $k Key to use to lookup (usually 'id' for this class)
  * @param mixed  $v Value to lookup
  *
  * @return Happening object found, or null for no hits
  *
  */
 function staticGet($k, $v = null)
 {
     return Memcached_DataObject::staticGet('Unavailable_status_network', $k, $v);
 }
開發者ID:Grasia,項目名稱:bolotweet,代碼行數:13,代碼來源:Unavailable_status_network.php

示例11: staticGet

 /**
  * Get an instance by key
  *
  * @param string $k Key to use to lookup (usually 'user_id' for this class)
  * @param mixed  $v Value to lookup
  *
  * @return User_greeting_count object found, or null for no hits
  *
  */
 function staticGet($k, $v = null)
 {
     return Memcached_DataObject::staticGet('Registration_ip', $k, $v);
 }
開發者ID:himmelex,項目名稱:NTW,代碼行數:13,代碼來源:Registration_ip.php

示例12: staticGet

 public function staticGet($topic, $callback)
 {
     return parent::staticGet(__CLASS__, 'hashkey', self::hashkey($topic, $callback));
 }
開發者ID:Br3nda,項目名稱:StatusNet,代碼行數:4,代碼來源:HubSub.php

示例13: doRecord

 /**
  * Save a mapping between a remote Yammer and local imported user.
  *
  * @param integer $user_id ID of the status in StatusNet
  * @param integer $orig_id ID of the notice in Yammer
  *
  * @return Yammer_common new object for this value
  */
 protected static function doRecord($class, $field, $orig_id, $local_id)
 {
     $map = parent::staticGet($class, 'id', $orig_id);
     if (!empty($map)) {
         return $map;
     }
     $map = parent::staticGet($class, $field, $local_id);
     if (!empty($map)) {
         return $map;
     }
     common_debug("Mapping Yammer {$field} {$orig_id} to local {$field} {$local_id}");
     $map = new $class();
     $map->id = $orig_id;
     $map->{$field} = $local_id;
     $map->created = common_sql_now();
     $map->insert();
     return $map;
 }
開發者ID:Grasia,項目名稱:bolotweet,代碼行數:26,代碼來源:Yammer_common.php

示例14: staticGet

 /**
  * Get an instance by key
  *
  * This is a utility method to get a single instance with a given key value.
  *
  * @param string $k Key to use to lookup (usually 'user_id' for this class)
  * @param mixed  $v Value to lookup
  *
  * @return SearchSub object found, or null for no hits
  *
  */
 function staticGet($k, $v = null)
 {
     return Memcached_DataObject::staticGet('SearchSub', $k, $v);
 }
開發者ID:harriewang,項目名稱:InnertieWebsite,代碼行數:15,代碼來源:SearchSub.php


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