proper check for .php plugin files

This commit is contained in:
Steffen Schröder
2014-08-07 13:47:26 +02:00
parent 227cccfaa2
commit a52f6894c0
2 changed files with 16 additions and 4 deletions

View File

@ -196,4 +196,15 @@ abstract class FileUtil {
}
return $path;
}
/**
* Check whether the given file name is a PHP file
*
* @param string $fileName
* @return bool
*/
public static function isPhpFileName($fileName) {
$extension = substr($fileName, -4);
return (strtolower($extension) === '.php');
}
}