本文整理汇总了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);
}