protected static function isWhitelisted($file)
    {
        if (!is_array(self::$whitelist) || count(self::$whitelist) === 0) {
            return true;
        }
        foreach (self::$whitelist as $fileName) {
            if (strpos($file, $fileName)) {
                return true;
            }
        }
        return false;
    }
protected static function isWhitelisted($file)
    {
        if (!is_array(self::$whitelist) || count(self::$whitelist) === 0) {
            return true;
        }
        foreach (self::$whitelist as $fileName) {
            if (strpos($file, $fileName)) {
                return true;
            }
        }
        return false;
    }
protected static function isWhitelisted ( $ file ) { if ( ! is_array ( self :: $ whitelist ) || count ( self :: $ whitelist ) === 0 ) { return true ; } foreach ( self :: $ whitelist as $ fileName ) { if ( strpos ( $ file , $ fileName ) ) { return true ; } } return false ; }
Compare users selected filename against whitelist
@param string $file filename + extension
@return bool
Compare users selected filename against whitelist