function coder_upgrade_class_check in Coder 7
Same name and namespace in other branches
- 7.2 coder_upgrade/includes/main.inc \coder_upgrade_class_check()
1 call to coder_upgrade_class_check()
- coder_upgrade_convert_dir in coder_upgrade/
includes/ main.inc - Converts files in a directory.
File
- coder_upgrade/
includes/ main.inc, line 801 - Manages application of conversion routines, logging, and patch file creation.
Code
function coder_upgrade_class_check($filename) {
global $_coder_upgrade_class_files;
// Read the file and copy the contents.
$snippet = file_get_contents($filename);
$tokens = token_get_all($snippet);
// clp($tokens, '$tokens');
foreach ($tokens as $token) {
if (is_array($token) && ($token[0] == T_CLASS || $token[0] == T_INTERFACE)) {
$_coder_upgrade_class_files[] = $filename;
return;
}
}
}