本文整理匯總了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;
}
示例2: staticGet
public function staticGet($k, $v = null)
{
return Memcached_DataObject::staticGet('Irc_waiting_message', $k, $v);
}
示例3: staticGet
function staticGet($k, $v = NULL)
{
return Memcached_DataObject::staticGet('File', $k, $v);
}
示例4: staticGet
function staticGet($k, $v = null)
{
return Memcached_DataObject::staticGet('Notice_tag', $k, $v);
}
示例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);
}
示例6: staticGet
public function staticGet($k, $v = null)
{
return parent::staticGet(__CLASS__, $k, $v);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例12: staticGet
public function staticGet($topic, $callback)
{
return parent::staticGet(__CLASS__, 'hashkey', self::hashkey($topic, $callback));
}
示例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;
}
示例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);
}