Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
ldy
/
phwoolcon
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 412f5ec7
authored
Nov 10, 2022
by
yeran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cli 模式下支持module config初始化
1 parent
0b7c0367
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletions
composer.json
src/Cli/Command/TaskCommand.php
composer.json
View file @
412f5ec
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
"description"
:
"Phalcon"
,
"description"
:
"Phalcon"
,
"keywords"
:
[
"phwoolcon"
],
"keywords"
:
[
"phwoolcon"
],
"type"
:
"library"
,
"type"
:
"library"
,
"version"
:
"1.0.1
1
"
,
"version"
:
"1.0.1
2
"
,
"license"
:
"proprietary"
,
"license"
:
"proprietary"
,
"authors"
:
[
"authors"
:
[
{
{
...
...
src/Cli/Command/TaskCommand.php
View file @
412f5ec
...
@@ -47,6 +47,14 @@ class TaskCommand extends Command
...
@@ -47,6 +47,14 @@ class TaskCommand extends Command
$this
->
output
->
writeln
(
''
);
$this
->
output
->
writeln
(
''
);
return
false
;
return
false
;
}
}
// 处理config注入
$secondSplit
=
strpos
(
$classArray
[
0
],
'\\'
,
strpos
(
$classArray
[
0
],
'\\'
)
+
1
);
$moduleClass
=
substr
(
$classArray
[
0
],
0
,
$secondSplit
)
.
'\Module'
;
if
(
class_exists
(
$moduleClass
)
&&
method_exists
(
$moduleClass
,
'registerServices'
)
&&
method_exists
(
$moduleClass
,
'registerAutoloaders'
))
{
$moduleObject
=
new
$moduleClass
;
$moduleObject
->
registerAutoloaders
(
$this
->
getDi
());
$moduleObject
->
registerServices
(
$this
->
getDi
());
}
$parameters
=
[];
$parameters
=
[];
if
(
$options
)
{
if
(
$options
)
{
parse_str
(
$options
,
$parameters
);
parse_str
(
$options
,
$parameters
);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment