定制 xtwoend/hyperf-tinker 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

xtwoend/hyperf-tinker

最新稳定版本:1.0.2

Composer 安装命令:

composer require xtwoend/hyperf-tinker

包简介

A Powerful REPL for the Hyperf framework.

README 文档

README

Latest Stable Version Total Downloads GitHub license

Installation

composer require gokure/hyperf-tinker

Publish Config

php bin/hyperf.php vendor:publish gokure/hyperf-tinker

Usage

php bin/hyperf.php tinker

Commnads

  • run command
>>> $a=1
=> 1
>>> $a
=> 1
>>> define('VERSION', 'v1.0.1')
=> true
>>> VERSION
=> "v1.0.1"
>>>
  • The help command
>>> help
  help       Show a list of commands. Type `help [foo]` for information about [foo].      Aliases: ?
  ls         List local, instance or class variables, methods and constants.              Aliases: dir
  dump       Dump an object or primitive.
  doc        Read the documentation for an object, class, constant, method or property.   Aliases: rtfm, man
  show       Show the code for an object, class, constant, method or property.
  wtf        Show the backtrace of the most recent exception.                             Aliases: last-exception, wtf?
  whereami   Show where you are in the code.
  throw-up   Throw an exception or error out of the Psy Shell.
  timeit     Profiles with a timer.
  trace      Show the current call stack.
  buffer     Show (or clear) the contents of the code input buffer.                       Aliases: buf
  clear      Clear the Psy Shell screen.
  edit       Open an external editor. Afterwards, get produced code in input buffer.
  sudo       Evaluate PHP code, bypassing visibility restrictions.
  history    Show the Psy Shell history.                                                  Aliases: hist
  exit       End the current session and return to caller.                                Aliases: quit, q
  • get hyperf env
>>> env("APP_NAME")
=> "skeleton"
>>>
  • query db
>>> $user = App\Model\User::find(1)
=> App\Model\User {#84118
     id: 1,
     name: "Gang Wu",
     email: "gokure@gmail.com",
     created_at: "2019-03-12 19:07:08",
     updated_at: "2021-01-25 10:35:22"
   }
  • class alias auto-load
>>> $user = User::find(1)
[!] Aliasing 'User' to 'App\Model\User' for this Tinker session.
=> App\Model\User {#84120
     id: 1,
     name: "Gang Wu",
     email: "gokure@gmail.com",
     created_at: "2019-03-12 19:07:08",
     updated_at: "2021-01-25 10:35:22"
   }
>>> collect([1, 2])
=> Hyperf\Utils\Collection {#84084
     all: [
       1,
       2,
     ],
   }

统计信息

  • 总下载量: 20
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固