Esempio n. 1
0
 /**
  *
  * Execute the command to extract an embedded object from a flash file
  *
  * @param string         $pathfile   the file
  * @param EmbeddedObject $embedded   The id of the object
  * @param string         $outputFile the path where to extract
  *
  * @return string|null The ouptut string, null on error
  *
  * @throws InvalidArgumentException
  * @throws RuntimeException
  */
 public function extract($pathfile, EmbeddedObject $embedded, $outputFile)
 {
     if (trim($outputFile) === '') {
         throw new InvalidArgumentException('Invalid output file');
     }
     try {
         return $this->command(array('-' . $embedded->getOption(), $embedded->getId(), $pathfile, '-o', $outputFile));
     } catch (ExecutionFailureException $e) {
         throw new RuntimeException(sprintf('%s failed to run command', $this->getName()), $e->getCode(), $e);
     }
 }
Esempio n. 2
0
 /**
  * @covers SwfTools\EmbeddedObject::getId
  */
 public function testGetId()
 {
     $this->assertEquals($this->id, $this->object->getId());
 }