Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P7106
Mermaid graph generator
Active
Public
Actions
Authored by
Nikerabbit
on May 9 2018, 12:57 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F18098373: Mermaid graph generator
May 9 2018, 12:57 PM
2018-05-09 12:57:28 (UTC+0)
Subscribers
None
<?php
$json
=
file_get_contents
(
'extension.json'
);
$data
=
json_decode
(
$json
,
true
);
$modules
=
$data
[
'ResourceModules'
];
foreach
(
$modules
as
$modName
=>
$definition
)
{
if
(
!
isset
(
$definition
[
'dependencies'
]
)
)
{
echo
"$modName
\n
"
;
continue
;
}
foreach
(
$definition
[
'dependencies'
]
as
$depName
)
{
if
(
isset
(
$modules
[
$depName
]
)
)
{
echo
"$depName --> $modName
\n
"
;
}
}
}
Event Timeline
Nikerabbit
created this paste.
May 9 2018, 12:57 PM
2018-05-09 12:57:28 (UTC+0)
Log In to Comment