AddUserCommand
扩展自 AbstractCommand添加用户的控制台命令
| 自 |
4.0.0 |
|---|---|
| 包 |
Joomla CMS |
方法
__construct
命令构造函数。
__construct(\Joomla\Database\DatabaseInterface db) :
| 自 |
4.2.0 |
|---|
参数
- db
DatabaseInterface数据库
响应
混合
configure
配置命令。
configure() :
| 自 |
4.0.0 |
|---|
响应
空
configureIO
配置 IO。
configureIO(\Symfony\Component\Console\Input\InputInterface input, \Symfony\Component\Console\Output\OutputInterface output) :
| 自 |
4.0.0 |
|---|
参数
- 输入
InputInterface注入到命令中的输入。- 输出
OutputInterface注入到命令中的输出。
响应
空
doExecute
执行命令的内部函数。
doExecute(\Symfony\Component\Console\Input\InputInterface input, \Symfony\Component\Console\Output\OutputInterface output) :
| 自 |
4.0.0 |
|---|
参数
- 输入
InputInterface注入到命令中的输入。- 输出
OutputInterface注入到命令中的输出。
响应
int命令退出代码
getGroupId
根据组名获取 groupId 的方法
getGroupId( groupName) :
| 自 |
4.0.0 |
|---|
参数
- groupName
string组名称
响应
int
getStringFromOption
获取选项值的方法
getStringFromOption( option, question) :
| 自 |
4.0.0 |
|---|
参数
- option
string设置选项名称- question
string如果用户未输入选项值,则设置问题
响应
string
getUserGroups
获取选项值的方法
getUserGroups() : mixed||string|int
| 自 |
4.0.0 |
|---|
响应
array<string|int, mixed>
属性
defaultName
默认命令名称
静态
| 自 |
4.0.0 |
|---|
类型(s)
string
ioStyle
SymfonyStyle 对象
| 自 |
4.0.0 |
|---|
类型(s)
对象
cliInput
存储输入对象
| 自 |
4.0.0 |
|---|
类型(s)
对象
user
用户名
| 自 |
4.0.0 |
|---|
类型(s)
string
password
密码
| 自 |
4.0.0 |
|---|
类型(s)
string
name
名称
| 自 |
4.0.0 |
|---|
类型(s)
string
电子邮件地址
| 自 |
4.0.0 |
|---|
类型(s)
string
userGroups
用户组
| 自 |
4.0.0 |
|---|
类型(s)
array<string|int, mixed>