Last active
May 16, 2020 23:42
-
-
Save aJamDonut/a10fa4c0280747e45c02f4018454e16c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//For Gist: https://gist.github.com/im4aLL/548c11c56dbc7267a2fe96bda6ed348b | |
preg_match('/Event::trigger\(((\'|\").*)(,|\',) \[(.*)]\)/', $line, $matches); | |
if(count($matches)>0) { | |
var_dump($matches); | |
/*array(5) { | |
[0]=> | |
string(40) "Event::trigger('get_cp_menu', [&$menus])" | |
[1]=> | |
string(13) "'get_cp_menu'" | |
[2]=> | |
string(1) "'" | |
[3]=> | |
string(1) "," | |
[4]=> | |
string(7) "&$menus" | |
} | |
array(5) { | |
[0]=> | |
string(70) "Event::trigger("get_cp_menu_".$subMenuCheck['codename'], [&$subItems])" | |
[1]=> | |
string(40) ""get_cp_menu_".$subMenuCheck['codename']" | |
[2]=> | |
string(1) """ | |
[3]=> | |
string(1) "," | |
[4]=> | |
string(10) "&$subItems" | |
}*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment