Commit 6837c4ce authored by tufengqi's avatar tufengqi

redis 公共函数

parent 65acb301
<?php
namespace fpf\cache;
interface BaseIntf
{
public function getTableKey($table, $key);
}
\ No newline at end of file
<?php
namespace fpf\cache;
class DefaultBaseImpl
{
public static function getTableKey($table_name, $key)
{
if (!property_exists(TableConstant::class, $table_name)) {
throw new Exception('table name is not found');
}
return TableConstant::$table_name . $key;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment