解决方案-web / gatekeeper-utils
v0.3.0
2017-08-16 09:39 UTC
Requires
- mako/framework: ^5.2
Requires (Dev)
- jakub-onderka/php-parallel-lint: ^0.9.2
- phpro/grumphp: ^0.9.6
- phpunit/phpunit: ^5.6
This package is not auto-updated.
Last update: 2022-02-01 12:49:12 UTC
README
目前,该包包含一些命令和过滤器,如有需要,将添加更多。如有缺失功能,请随意分支并提交问题。
安装
安装使用composer进行。该包指定了兼容的Mako版本,因此您无需担心使用哪个版本。
composer require bertptrs/gatekeeper-utils:*
之后,您需要将包注册为可加载。这已在app/config/application.php
文件中指定。
<?php return [ // The rest of your config 'packages' => [ "core" => [ 'solutionweb\gatekeeper\utils\GatekeeperUtilsPackage', ], "cli" => [], "web" => [], ], // The other rest of your config ];
我建议您在core
包中注册该包,但如果您只使用过滤器或命令,您可以将它分别注册在web
和cli
包中。
可用命令
目前,有三个支持的命令。这些命令在插件加载时自动注册。所有命令都以前缀gatekeeper::
开头,以防止名称冲突。
user.create
帮助您创建新用户。user.activate
(de)激活用户账户。user.password
可以设置用户的新密码。group.create
创建新组。group.member
可以向组中添加和删除成员。group.delete
删除组。
有关功能和选项的更多信息,您可以使用 --help 标志,如下所示
$ php app/reactor gatekeeper::user.create --help
Command:
php reactor gatekeeper::user.create
Description:
Create a new user.
Options:
----------------------------------------------------------------
| Name | Description | Optional |
----------------------------------------------------------------
| noactivate | Do not activate the user by default. | true |
----------------------------------------------------------------