コード例 #1
0
 public function testSetters()
 {
     $this->file->setPath('test.tgz');
     $this->file->setFormatChain(new Format\FormatChain([new Format\Composed\TarGz()]));
     $this->assertEquals('test.tgz', $this->file->getPath());
     $this->assertInstanceOf('\\Distill\\Format\\Composed\\TarGz', $this->file->getFormatChain()->getChainFormats()[0]);
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 protected function getPriorityValueForFile(FileInterface $file, array $methods)
 {
     $formatChain = $file->getFormatChain();
     return $this->getMaxUncompressionSpeedFormatChain($formatChain, $methods) + $formatChain->getCompressionRatioLevel() / 10;
 }