code: private function isValid($source = '')
      {
          if(empty($source)) {
              return false;
          } else {
              $extension = substr($source, -3);
  
              if(strtolower($extension) !== 'swf') {
                  return false;
              }
          }
  
          return true;
      }
docs: Checks if the source has allowed extension
  
  @param string $source
  @return bool