Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
98d2e183
Commit
98d2e183
authored
May 11, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/yiisoft/yii2
parents
e9519393
bdee4112
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
38 deletions
+19
-38
index.php
yii/requirements/views/console/index.php
+19
-38
No files found.
yii/requirements/views/console/index.php
View file @
98d2e183
...
@@ -10,47 +10,27 @@ echo "for running Yii application.\n";
...
@@ -10,47 +10,27 @@ echo "for running Yii application.\n";
echo
"It checks if the server is running the right version of PHP,
\n
"
;
echo
"It checks if the server is running the right version of PHP,
\n
"
;
echo
"if appropriate PHP extensions have been loaded, and if php.ini file settings are correct.
\n
"
;
echo
"if appropriate PHP extensions have been loaded, and if php.ini file settings are correct.
\n
"
;
echo
"
\n
Conclusion:
\n
"
;
$header
=
'Check conclusion:'
;
echo
"
\n
{
$header
}
\n
"
;
$columnSizes
=
array
(
echo
str_pad
(
''
,
strlen
(
$header
),
'-'
)
.
"
\n\n
"
;
'name'
=>
25
,
'condition'
=>
10
,
foreach
(
$requirements
as
$key
=>
$requirement
)
{
'by'
=>
30
,
if
(
$requirement
[
'condition'
])
{
'memo'
=>
50
,
echo
$requirement
[
'name'
]
.
": OK
\n
"
;
);
echo
"
\n
"
;
}
else
{
// Headers:
echo
$requirement
[
'name'
]
.
': '
.
(
$requirement
[
'mandatory'
]
?
'FAILED!!!'
:
'WARNING!!!'
)
.
"
\n
"
;
$tableLength
=
count
(
$columnSizes
)
+
1
;
echo
'Required by: '
.
strip_tags
(
$requirement
[
'by'
])
.
"
\n
"
;
foreach
(
$columnSizes
as
$columnSize
)
{
$memo
=
strip_tags
(
$requirement
[
'memo'
]);
$tableLength
+=
$columnSize
;
if
(
!
empty
(
$memo
))
{
}
echo
'Memo: '
.
strip_tags
(
$requirement
[
'memo'
])
.
"
\n
"
;
echo
str_pad
(
''
,
$tableLength
,
'-'
);
}
echo
"
\n
"
;
echo
"
\n
"
;
echo
'|'
.
str_pad
(
'Name'
,
$columnSizes
[
'name'
],
' '
,
STR_PAD_BOTH
)
.
'|'
;
}
echo
str_pad
(
'Result'
,
$columnSizes
[
'condition'
],
' '
,
STR_PAD_BOTH
)
.
'|'
;
echo
str_pad
(
'Required By'
,
$columnSizes
[
'by'
],
' '
,
STR_PAD_BOTH
)
.
'|'
;
echo
str_pad
(
'Memo'
,
$columnSizes
[
'memo'
],
' '
,
STR_PAD_BOTH
)
.
'|'
;
echo
"
\n
"
;
echo
str_pad
(
''
,
$tableLength
,
'-'
);
echo
"
\n
"
;
// Rows:
foreach
(
$requirements
as
$requirement
)
{
$name
=
$requirement
[
'name'
];
echo
'|'
.
str_pad
(
' '
.
$name
,
$columnSizes
[
'name'
],
' '
,
STR_PAD_RIGHT
)
.
'|'
;
$condition
=
$requirement
[
'condition'
]
?
'Passed'
:
(
$requirement
[
'mandatory'
]
?
'FAILED'
:
'WARNING'
);
echo
str_pad
(
$condition
,
$columnSizes
[
'condition'
],
' '
,
STR_PAD_BOTH
)
.
'|'
;
$by
=
strip_tags
(
$requirement
[
'by'
]);
echo
str_pad
(
$by
,
$columnSizes
[
'by'
],
' '
,
STR_PAD_BOTH
)
.
'|'
;
$memo
=
strip_tags
(
$requirement
[
'memo'
]);
echo
str_pad
(
' '
.
$memo
,
$columnSizes
[
'memo'
],
' '
,
STR_PAD_RIGHT
)
.
'|'
;
echo
"
\n
"
;
}
}
echo
str_pad
(
''
,
$tableLength
,
'-'
);
echo
"
\n
"
;
// Summary
$summaryString
=
'Errors: '
.
$summary
[
'errors'
]
.
' Warnings: '
.
$summary
[
'warnings'
]
.
' Total checks: '
.
$summary
[
'total'
];
$summaryString
=
'Errors: '
.
$summary
[
'errors'
]
.
' Warnings: '
.
$summary
[
'warnings'
]
.
' Total checks: '
.
$summary
[
'total'
];
echo
str_pad
(
''
,
strlen
(
$summaryString
),
'-'
)
.
"
\n
"
;
echo
$summaryString
;
echo
$summaryString
;
echo
"
\n\n
"
;
echo
"
\n\n
"
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment