1.4.1版本更新:优化和优化uuid生成规则,修复缓存驱动为文件,增加通知错误,允许在模型本身classArticleextendsModel{CONSTTABLE='articles';中创建查询生成器链调用;publicfunctionweek(){return$this->where('create_at','>',strtotime('-1week'));}/***按喜欢排序*/publicfunctionorderByLikeCount(){return$this->orderBy('like_count','desc');}}//根据点赞数获取每周排行榜Article::column(['id','title'])->where('create_at','>',strtotime('-1week'))->orderBy('like_count','desc')->limit(10)->findAll();//通过查询构造函数Article::column(['id','title'])->week()->orderByLikeCount()->limit(10)->findAll();添加rpc方法支持数组//添加方法`method1`,`method2`供远程客户端调用RpcServer::add(Abc::class,'method1');RpcServer::add(Abc::class,'method2');//现在你可以写RpcServer::add(Abc::class,['method1','method2']);队列固定长度$global_data=new\App\GlobalData\Client();//设置队列为固定长度$global_data->setQueueLimit(3);$arr=[1,2,3,4,5];foreach($arras$i){$global_data->push('abc',$i);}while(1){$ret=$global_data->pop('abc');如果($ret!==null){echo$ret.PHP_EOL;}else{休息;}}//以上输出//3//4//5//删除固定长度限制$global_data->delQueueLimit('abc');github:https://github.com/lizhichao/one码云:https://gitee.com/vicself/one
