网站首页 站内搜索

搜索结果

查询Tags标签: hyperf,共有 43条记录
  • 深入 Hyperf:HTTP 服务启动时发生了什么?

    当我们创建 Hyperf 项目之后,只需要在终端执行 php bin/hyperf.php start 启动命令,等上几秒钟,就可以看到终端输出的 Worker 进程已启动,HTTP 服务监听在 9501 端口的日志信息。 [INFO] Worker#3 started. [INFO] Worker#1 started. [INFO] Worker#2 started. …

    2023/5/19 18:22:06 人评论 次浏览
  • Hyperf 实现redis消息队列-源码解读

    Hyperf 实现redis消息队列-源码解读之前写过一篇笔记《Redis实现消息队列》,其中对消息队列以及redis实现消息队列的三种方式进行了介绍。下面来对hyperf实现redis消息队列的源码进行解读,加深对redis如何来实现消息队列的理解。一、实现Redis消息队列的各个文件1、Drive…

    2022/6/29 2:22:31 人评论 次浏览
  • hyperf 数据库模型-修改器

    访问器 Index控制器 app/Controller/IndexController.php <?php namespace App\Controller;use Hyperf\HttpServer\Contract\RequestInterface; use Hyperf\HttpServer\Annotation\AutoController; use App\Model\User;/*** @AutoController();*/ class IndexControll…

    2021/10/1 19:14:26 人评论 次浏览
  • hyperf 数据库模型-修改器

    访问器 Index控制器 app/Controller/IndexController.php <?php namespace App\Controller;use Hyperf\HttpServer\Contract\RequestInterface; use Hyperf\HttpServer\Annotation\AutoController; use App\Model\User;/*** @AutoController();*/ class IndexControll…

    2021/10/1 19:14:26 人评论 次浏览
  • hyperf 数据库模型缓存

    安装模型缓存组件 composer require hyperf/model-cache 控制器 app/Controller/IndexController.php <?php namespace App\Controller;use Hyperf\HttpServer\Contract\RequestInterface; use Hyperf\HttpServer\Annotation\AutoController; use App\Model\User;/***…

    2021/9/29 2:10:39 人评论 次浏览
  • hyperf 数据库模型缓存

    安装模型缓存组件 composer require hyperf/model-cache 控制器 app/Controller/IndexController.php <?php namespace App\Controller;use Hyperf\HttpServer\Contract\RequestInterface; use Hyperf\HttpServer\Annotation\AutoController; use App\Model\User;/***…

    2021/9/29 2:10:39 人评论 次浏览
  • hyperf 数据库模型-model操作

    生成model php bin/hyperf.php gen:model user User model app/Model/User.php <?phpdeclare (strict_types=1); namespace App\Model;use Hyperf\DbConnection\Model\Model; /***/ class User extends Model {/*** The table associated with the model.** @var stri…

    2021/9/26 19:12:54 人评论 次浏览
  • hyperf 数据库模型-model操作

    生成model php bin/hyperf.php gen:model user User model app/Model/User.php <?phpdeclare (strict_types=1); namespace App\Model;use Hyperf\DbConnection\Model\Model; /***/ class User extends Model {/*** The table associated with the model.** @var stri…

    2021/9/26 19:12:54 人评论 次浏览
  • hyperf数据库模型-1

    安装数据库组件 composer require hyperf/db-connection 数据库配置 <?phpdeclare(strict_types=1);return [default => [driver => env(DB_DRIVER, mysql),host => env(DB_HOST, mysql),database => env(DB_DATABASE, hyperf),port => env(DB_PORT, 3…

    2021/9/26 2:10:41 人评论 次浏览
  • hyperf数据库模型-1

    安装数据库组件 composer require hyperf/db-connection 数据库配置 <?phpdeclare(strict_types=1);return [default => [driver => env(DB_DRIVER, mysql),host => env(DB_HOST, mysql),database => env(DB_DATABASE, hyperf),port => env(DB_PORT, 3…

    2021/9/26 2:10:41 人评论 次浏览
  • hyperf 协程理解和使用

    协程是一种轻量级的线程,由用户代码来调度和管理,而不是由操作系统内核来进行调度,也就是在用户态进行 创建协程方法 co函数 public function test(){echo "first id: ". Coroutine::id().PHP_EOL;co(function () {echo "second id: ". Coroutine:…

    2021/9/7 6:07:50 人评论 次浏览
  • hyperf 协程理解和使用

    协程是一种轻量级的线程,由用户代码来调度和管理,而不是由操作系统内核来进行调度,也就是在用户态进行 创建协程方法 co函数 public function test(){echo "first id: ". Coroutine::id().PHP_EOL;co(function () {echo "second id: ". Coroutine:…

    2021/9/7 6:07:50 人评论 次浏览
  • hyperf 配置

    添加配置(author) config/config.php <?phpdeclare(strict_types=1);use Hyperf\Contract\StdoutLoggerInterface; use Psr\Log\LogLevel;return [app_name => env(APP_NAME, skeleton),app_env => env(APP_ENV, dev),scan_cacheable => env(SCAN_CACHEABLE,…

    2021/9/7 6:06:22 人评论 次浏览
  • hyperf 配置

    添加配置(author) config/config.php <?phpdeclare(strict_types=1);use Hyperf\Contract\StdoutLoggerInterface; use Psr\Log\LogLevel;return [app_name => env(APP_NAME, skeleton),app_env => env(APP_ENV, dev),scan_cacheable => env(SCAN_CACHEABLE,…

    2021/9/7 6:06:22 人评论 次浏览
  • Hyperf-消息队列

    Hyperf-消息队列官方文档里面有详细说明,安装和配置不再赘述,这里只是记录下实际中使用Redis异步队列的具体使用。工作原理ConsumerProcess 是异步消费进程,会根据用户创建的 Job 或者使用 @AsyncQueueMessage 的代码块,执行消费逻辑。 Job 和 @AsyncQueueMessage 都是…

    2021/5/13 11:00:33 人评论 次浏览
共43记录«上一页123下一页»
扫一扫关注最新编程教程