Ejemplo n.º 1
0
 /**
  * Checks the support for a format.
  * @param Format\FormatInterface $format Format
  *
  * @return bool Returns TRUE if the format is supported, FALSE otherwise.
  */
 protected function checkFormatSupport(Format\FormatInterface $format)
 {
     $samples = $format->getSamples();
     if (false === array_key_exists(Format\FormatInterface::SAMPLE_REGULAR, $samples)) {
         return false;
     }
     if (false === file_exists($samples[Format\FormatInterface::SAMPLE_REGULAR])) {
         return false;
     }
     $exitCode = $this->executeCommand('7z t ' . $samples[Format\FormatInterface::SAMPLE_REGULAR]);
     return 0 === $exitCode;
 }